├── .vs ├── JWTRoleBasedAuth │ ├── v14 │ │ └── .suo │ └── v15 │ │ ├── .suo │ │ └── sqlite3 │ │ └── storage.ide └── config │ └── applicationhost.config ├── JWTRoleBasedAuth.sln ├── NetCoreWebApi ├── BindingModels │ ├── LoginBindingModel.cs │ └── RegisterBindingModel.cs ├── Controllers │ └── UsersController.cs ├── DTOs │ └── UserDTO.cs ├── EntityContext │ ├── DataContext.cs │ └── User.cs ├── JWTRoleBasedAuth.csproj ├── JWTRoleBasedAuth.csproj.user ├── JwtHelpers │ ├── JwtExtensions.cs │ ├── JwtSecurityKey.cs │ ├── JwtToken.cs │ └── JwtTokenBuilder.cs ├── Migrations │ ├── 20180721074414_Initial.Designer.cs │ ├── 20180721074414_Initial.cs │ └── DataContextModelSnapshot.cs ├── Program.cs ├── Properties │ ├── PublishProfiles │ │ ├── FolderProfile.pubxml │ │ └── FolderProfile.pubxml.user │ └── launchSettings.json ├── ScaffoldingReadMe.txt ├── Startup.cs ├── Utility │ ├── CryptoHelper.cs │ ├── CustomResponse.cs │ ├── Enums.cs │ ├── ExtensionMethods.cs │ └── Global.cs ├── Views │ ├── Shared │ │ └── Error.cshtml │ └── _ViewStart.cshtml ├── appsettings.Development.json ├── appsettings.json ├── bin │ ├── Debug │ │ └── netcoreapp2.0 │ │ │ ├── BLL.dll │ │ │ ├── BLL.pdb │ │ │ ├── DAL.dll │ │ │ ├── DAL.pdb │ │ │ ├── ErrorLog.txt │ │ │ ├── JWTRoleBasedAuth.deps.json │ │ │ ├── JWTRoleBasedAuth.dll │ │ │ ├── JWTRoleBasedAuth.pdb │ │ │ ├── JWTRoleBasedAuth.runtimeconfig.dev.json │ │ │ ├── JWTRoleBasedAuth.runtimeconfig.json │ │ │ ├── NetCoreWebApi.deps.json │ │ │ ├── NetCoreWebApi.dll │ │ │ ├── NetCoreWebApi.pdb │ │ │ ├── NetCoreWebApi.runtimeconfig.dev.json │ │ │ ├── NetCoreWebApi.runtimeconfig.json │ │ │ ├── Wasalee.deps.json │ │ │ ├── Wasalee.dll │ │ │ ├── Wasalee.pdb │ │ │ ├── Wasalee.runtimeconfig.dev.json │ │ │ ├── Wasalee.runtimeconfig.json │ │ │ └── swagger.json │ └── Release │ │ ├── PublishOutput │ │ ├── AutoMapper.Extensions.Microsoft.DependencyInjection.dll │ │ ├── AutoMapper.dll │ │ ├── BLL.dll │ │ ├── BLL.pdb │ │ ├── DAL.dll │ │ ├── DAL.pdb │ │ ├── Microsoft.CodeAnalysis.CSharp.Workspaces.dll │ │ ├── Microsoft.CodeAnalysis.Workspaces.dll │ │ ├── Microsoft.EntityFrameworkCore.dll │ │ ├── Microsoft.Extensions.Caching.Abstractions.dll │ │ ├── Microsoft.Extensions.Caching.Memory.dll │ │ ├── Microsoft.Extensions.Logging.Abstractions.dll │ │ ├── Microsoft.Extensions.Logging.dll │ │ ├── Microsoft.Extensions.Options.dll │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.Core.dll │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.dll │ │ ├── Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll │ │ ├── Newtonsoft.Json.dll │ │ ├── NuGet.Frameworks.dll │ │ ├── Swashbuckle.AspNetCore.Swagger.dll │ │ ├── Swashbuckle.AspNetCore.SwaggerGen.dll │ │ ├── Swashbuckle.AspNetCore.SwaggerUI.dll │ │ ├── Swashbuckle.AspNetCore.dll │ │ ├── System.Composition.AttributedModel.dll │ │ ├── System.Composition.Convention.dll │ │ ├── System.Composition.Hosting.dll │ │ ├── System.Composition.Runtime.dll │ │ ├── System.Composition.TypedParts.dll │ │ ├── Wasalee.PrecompiledViews.dll │ │ ├── Wasalee.PrecompiledViews.pdb │ │ ├── Wasalee.deps.json │ │ ├── Wasalee.dll │ │ ├── Wasalee.pdb │ │ ├── Wasalee.runtimeconfig.json │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── dotnet-aspnet-codegenerator-design.dll │ │ ├── logs │ │ │ ├── stdout_19848_20187911859.log │ │ │ ├── stdout_21772_20187108040.log │ │ │ ├── stdout_27268_20187911229.log │ │ │ ├── stdout_34836_201871311494.log │ │ │ ├── stdout_35688_2018712115637.log │ │ │ ├── stdout_36952_2018713101826.log │ │ │ ├── stdout_40220_20187145344.log │ │ │ ├── stdout_42684_201871210275.log │ │ │ ├── stdout_42704_201871310514.log │ │ │ └── stdout_7560_2018712784.log │ │ └── web.config │ │ └── netcoreapp2.0 │ │ ├── BLL.dll │ │ ├── BLL.pdb │ │ ├── DAL.dll │ │ ├── DAL.pdb │ │ ├── Wasalee.deps.json │ │ ├── Wasalee.dll │ │ ├── Wasalee.pdb │ │ ├── Wasalee.runtimeconfig.dev.json │ │ └── Wasalee.runtimeconfig.json ├── obj │ ├── Debug │ │ └── netcoreapp2.0 │ │ │ ├── JWTRoleBasedAuth.AssemblyInfo.cs │ │ │ ├── JWTRoleBasedAuth.AssemblyInfoInputs.cache │ │ │ ├── JWTRoleBasedAuth.csproj.CoreCompileInputs.cache │ │ │ ├── JWTRoleBasedAuth.csproj.FileListAbsolute.txt │ │ │ ├── JWTRoleBasedAuth.csprojResolveAssemblyReference.cache │ │ │ ├── JWTRoleBasedAuth.dll │ │ │ ├── JWTRoleBasedAuth.pdb │ │ │ ├── NetCoreWebApi.AssemblyInfo.cs │ │ │ ├── NetCoreWebApi.AssemblyInfoInputs.cache │ │ │ ├── NetCoreWebApi.csproj.CoreCompileInputs.cache │ │ │ ├── NetCoreWebApi.csproj.FileListAbsolute.txt │ │ │ ├── NetCoreWebApi.csprojResolveAssemblyReference.cache │ │ │ ├── NetCoreWebApi.dll │ │ │ ├── NetCoreWebApi.pdb │ │ │ ├── Wasalee.AssemblyInfo.cs │ │ │ ├── Wasalee.AssemblyInfoInputs.cache │ │ │ ├── Wasalee.csproj.CopyComplete │ │ │ ├── Wasalee.csproj.CoreCompileInputs.cache │ │ │ ├── Wasalee.csproj.FileListAbsolute.txt │ │ │ ├── Wasalee.csprojResolveAssemblyReference.cache │ │ │ ├── Wasalee.dll │ │ │ └── Wasalee.pdb │ ├── JWTRoleBasedAuth.csproj.nuget.cache │ ├── JWTRoleBasedAuth.csproj.nuget.g.props │ ├── JWTRoleBasedAuth.csproj.nuget.g.targets │ ├── NetCoreWebApi.csproj.nuget.cache │ ├── NetCoreWebApi.csproj.nuget.g.props │ ├── NetCoreWebApi.csproj.nuget.g.targets │ ├── Release │ │ └── netcoreapp2.0 │ │ │ ├── PubTmp │ │ │ └── Out │ │ │ │ ├── AutoMapper.Extensions.Microsoft.DependencyInjection.dll │ │ │ │ ├── AutoMapper.dll │ │ │ │ ├── BLL.dll │ │ │ │ ├── BLL.pdb │ │ │ │ ├── DAL.dll │ │ │ │ ├── DAL.pdb │ │ │ │ ├── Microsoft.CodeAnalysis.CSharp.Workspaces.dll │ │ │ │ ├── Microsoft.CodeAnalysis.Workspaces.dll │ │ │ │ ├── Microsoft.EntityFrameworkCore.dll │ │ │ │ ├── Microsoft.Extensions.Caching.Abstractions.dll │ │ │ │ ├── Microsoft.Extensions.Caching.Memory.dll │ │ │ │ ├── Microsoft.Extensions.Logging.Abstractions.dll │ │ │ │ ├── Microsoft.Extensions.Logging.dll │ │ │ │ ├── Microsoft.Extensions.Options.dll │ │ │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll │ │ │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.Core.dll │ │ │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll │ │ │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll │ │ │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll │ │ │ │ ├── Microsoft.VisualStudio.Web.CodeGeneration.dll │ │ │ │ ├── Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll │ │ │ │ ├── Newtonsoft.Json.dll │ │ │ │ ├── NuGet.Frameworks.dll │ │ │ │ ├── Swashbuckle.AspNetCore.Swagger.dll │ │ │ │ ├── Swashbuckle.AspNetCore.SwaggerGen.dll │ │ │ │ ├── Swashbuckle.AspNetCore.SwaggerUI.dll │ │ │ │ ├── Swashbuckle.AspNetCore.dll │ │ │ │ ├── System.Composition.AttributedModel.dll │ │ │ │ ├── System.Composition.Convention.dll │ │ │ │ ├── System.Composition.Hosting.dll │ │ │ │ ├── System.Composition.Runtime.dll │ │ │ │ ├── System.Composition.TypedParts.dll │ │ │ │ ├── Wasalee.PrecompiledViews.dll │ │ │ │ ├── Wasalee.PrecompiledViews.pdb │ │ │ │ ├── Wasalee.deps.json │ │ │ │ ├── Wasalee.dll │ │ │ │ ├── Wasalee.pdb │ │ │ │ ├── Wasalee.runtimeconfig.json │ │ │ │ ├── appsettings.Development.json │ │ │ │ ├── appsettings.json │ │ │ │ ├── dotnet-aspnet-codegenerator-design.dll │ │ │ │ ├── swagger.json │ │ │ │ └── web.config │ │ │ ├── Wasalee.AssemblyInfo.cs │ │ │ ├── Wasalee.AssemblyInfoInputs.cache │ │ │ ├── Wasalee.PrecompiledViews.dll │ │ │ ├── Wasalee.PrecompiledViews.pdb │ │ │ ├── Wasalee.csproj.CopyComplete │ │ │ ├── Wasalee.csproj.CoreCompileInputs.cache │ │ │ ├── Wasalee.csproj.FileListAbsolute.txt │ │ │ ├── Wasalee.csprojResolveAssemblyReference.cache │ │ │ ├── Wasalee.dll │ │ │ ├── Wasalee.pdb │ │ │ └── microsoft.aspnetcore.mvc.razor.viewcompilation.rsp │ ├── Wasalee.csproj.nuget.cache │ ├── Wasalee.csproj.nuget.g.props │ ├── Wasalee.csproj.nuget.g.targets │ └── project.assets.json └── swagger.json └── README.md /.vs/JWTRoleBasedAuth/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/.vs/JWTRoleBasedAuth/v14/.suo -------------------------------------------------------------------------------- /.vs/JWTRoleBasedAuth/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/.vs/JWTRoleBasedAuth/v15/.suo -------------------------------------------------------------------------------- /.vs/JWTRoleBasedAuth/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/.vs/JWTRoleBasedAuth/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /.vs/config/applicationhost.config: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 48 | 49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | 79 |
80 |
81 | 82 |
83 |
84 |
85 |
86 |
87 |
88 | 89 |
90 |
91 |
92 |
93 |
94 | 95 |
96 |
97 |
98 | 99 |
100 |
101 | 102 |
103 |
104 | 105 |
106 |
107 |
108 | 109 | 110 |
111 |
112 |
113 |
114 |
115 |
116 | 117 |
118 |
119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 974 | 975 | 976 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | -------------------------------------------------------------------------------- /JWTRoleBasedAuth.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26730.8 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JWTRoleBasedAuth", "NetCoreWebApi\JWTRoleBasedAuth.csproj", "{AAB1694D-B183-4F11-9C27-349E1D46EDDB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {AAB1694D-B183-4F11-9C27-349E1D46EDDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {AAB1694D-B183-4F11-9C27-349E1D46EDDB}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {AAB1694D-B183-4F11-9C27-349E1D46EDDB}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {AAB1694D-B183-4F11-9C27-349E1D46EDDB}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {D84ADC74-AB11-417E-A6DC-465F79177891} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /NetCoreWebApi/BindingModels/LoginBindingModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Wasalee.BindingModels 8 | { 9 | public class LoginBindingModel 10 | { 11 | [Required] 12 | public string username { get; set; } 13 | 14 | [Required] 15 | public string password { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NetCoreWebApi/BindingModels/RegisterBindingModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Wasalee.BindingModels 8 | { 9 | public class RegisterBindingModel 10 | { 11 | [Required] 12 | public string FullName { get; set; } 13 | 14 | [Required] 15 | public string Email { get; set; } 16 | 17 | [Required] 18 | public string PhoneNo { get; set; } 19 | 20 | [Required] 21 | public string Location { get; set; } 22 | 23 | [Required] 24 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 25 | public string Password { get; set; } 26 | } 27 | 28 | public class RegisterDriverBindingModel 29 | { 30 | [Required] 31 | public string FullName { get; set; } 32 | 33 | [Required] 34 | public string DateOfBirth { get; set; } 35 | 36 | [Required] 37 | public string PhoneNo { get; set; } 38 | 39 | [Required] 40 | public string HomeAddress { get; set; } 41 | 42 | [Required] 43 | public string LicenseNo { get; set; } 44 | 45 | public string BriefIntro { get; set; } 46 | 47 | public string WorkHistory { get; set; } 48 | 49 | [Required] 50 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 51 | public string Password { get; set; } 52 | 53 | [Required] 54 | public string Email { get; internal set; } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /NetCoreWebApi/Controllers/UsersController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Microsoft.AspNetCore.Mvc; 4 | using Wasalee.ResponseFormats; 5 | using Wasalee.Utility; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Authorization; 8 | using Wasalee.JwtHelpers; 9 | using Microsoft.Extensions.Configuration; 10 | using Wasalee.DTOs; 11 | using Wasalee.BindingModels; 12 | using AutoMapper; 13 | using JWTRoleBasedAuth.EntityContext; 14 | using System.Linq; 15 | 16 | namespace NetCoreWebApi.Controllers 17 | { 18 | [Route("/api/User")] 19 | public class UsersController : Controller 20 | { 21 | #region Properties and constructor 22 | public IConfiguration _configuration { get; } 23 | protected readonly DataContext _dbContext; 24 | 25 | public UsersController(DataContext dataContext, IConfiguration configuration) 26 | { 27 | _dbContext = dataContext; 28 | _configuration = configuration; 29 | } 30 | #endregion 31 | 32 | [HttpPost] 33 | [Route("Login")] 34 | public async Task Login(LoginBindingModel model) 35 | { 36 | try 37 | { 38 | if (!ModelState.IsValid) 39 | return BadRequest(ModelState); 40 | 41 | var user = _dbContext.Users.FirstOrDefault(x => x.Email == model.username && x.Password == model.password); 42 | 43 | if (user != null) 44 | { 45 | var userDTO = Mapper.Map(user); 46 | 47 | userDTO.GenerateToken(_configuration); 48 | 49 | return Ok(new CustomResponse { Message = Global.ResponseMessages.Success, StatusCode = StatusCodes.Status200OK, Result = userDTO }); 50 | } 51 | else 52 | { 53 | return Ok(new CustomResponse 54 | { 55 | Message = Global.ResponseMessages.Forbidden, 56 | StatusCode = StatusCodes.Status403Forbidden, 57 | Result = new Error { ErrorMessage = Global.ResponseMessages.GenerateInvalid("username or password") } 58 | }); 59 | } 60 | } 61 | catch (Exception ex) 62 | { 63 | return StatusCode(Error.LogError(ex)); 64 | } 65 | } 66 | 67 | [Route("LoginAsAdmin")] 68 | [HttpGet] 69 | public async Task LoginAsAdmin(string username, string password) 70 | { 71 | if (username == "Admin" && password == "Pass") 72 | { 73 | var token = new JwtTokenBuilder() 74 | .AddSecurityKey(JwtSecurityKey.Create(_configuration.GetValue("JwtSecretKey"))) 75 | .AddIssuer(_configuration.GetValue("JwtIssuer")) 76 | .AddAudience(_configuration.GetValue("JwtAudience")) 77 | .AddExpiry(1) 78 | .AddClaim("Name", "Admin") 79 | .AddRole("Admin") 80 | .Build(); 81 | 82 | return Ok(new CustomResponse { Message = Global.ResponseMessages.Success, StatusCode = StatusCodes.Status200OK, Result = token.Value }); 83 | } 84 | else 85 | return Ok(new CustomResponse { Message = Global.ResponseMessages.Forbidden, StatusCode = StatusCodes.Status403Forbidden, Result = new Error { ErrorMessage = Global.ResponseMessages.GenerateInvalid("username or password") } }); 86 | 87 | } 88 | 89 | [Route("GetUser")] 90 | [Authorize(Roles = "User, Admin")] 91 | [HttpGet] 92 | public async Task GetUser() 93 | { 94 | var name = User.GetClaimValue("Name"); 95 | 96 | return Ok(new CustomResponse { Message = Global.ResponseMessages.Success, StatusCode = StatusCodes.Status200OK, Result = "You are an authorized user" }); 97 | } 98 | 99 | [Route("GetAdmin")] 100 | [Authorize(Roles = "Admin")] 101 | [HttpGet] 102 | public async Task GetAdmin() 103 | { 104 | var name = User.GetClaimValue("Name"); 105 | 106 | return Ok(new CustomResponse { Message = Global.ResponseMessages.Success, StatusCode = StatusCodes.Status200OK, Result = "You are an authorized user" }); 107 | } 108 | } 109 | } -------------------------------------------------------------------------------- /NetCoreWebApi/DTOs/UserDTO.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Wasalee.DTOs 8 | { 9 | public class UserDTO 10 | { 11 | public int Id { get; set; } 12 | 13 | public string FirstName { get; set; } 14 | 15 | public string LastName { get; set; } 16 | 17 | public string FullName { get; set; } 18 | 19 | public string ProfilePictureUrl { get; set; } 20 | 21 | public string Email { get; set; } 22 | 23 | public string Phone { get; set; } 24 | 25 | public string ZipCode { get; set; } 26 | 27 | public string DateofBirth { get; set; } 28 | 29 | public int? SignInType { get; set; } 30 | 31 | public short? Status { get; set; } 32 | 33 | public bool EmailConfirmed { get; set; } 34 | 35 | public bool PhoneConfirmed { get; set; } 36 | 37 | public bool IsNotificationsOn { get; set; } 38 | 39 | public string Location { get; set; } 40 | 41 | public string Token { get; set; } 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /NetCoreWebApi/EntityContext/DataContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.EntityFrameworkCore; 6 | 7 | namespace JWTRoleBasedAuth.EntityContext 8 | { 9 | public class DataContext : DbContext 10 | { 11 | public DataContext(DbContextOptions options) 12 | : base(options) { } 13 | 14 | public DbSet Users { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NetCoreWebApi/EntityContext/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace JWTRoleBasedAuth.EntityContext 7 | { 8 | public class User 9 | { 10 | public int Id { get; set; } 11 | 12 | public string FirstName { get; set; } 13 | 14 | public string LastName { get; set; } 15 | 16 | public string Email { get; set; } 17 | 18 | public string Password { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /NetCoreWebApi/JWTRoleBasedAuth.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /NetCoreWebApi/JWTRoleBasedAuth.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 600 5 | 600 6 | True 7 | False 8 | True 9 | 10 | False 11 | FolderProfile 12 | 13 | -------------------------------------------------------------------------------- /NetCoreWebApi/JwtHelpers/JwtExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Wasalee.DTOs; 3 | using Microsoft.Extensions.Configuration; 4 | 5 | namespace Wasalee.JwtHelpers 6 | { 7 | public static class JwtExtensions 8 | { 9 | public static void GenerateToken(this UserDTO user, IConfiguration configuration) 10 | { 11 | try 12 | { 13 | var token = new JwtTokenBuilder() 14 | .AddSecurityKey(JwtSecurityKey.Create(configuration.GetValue("JwtSecretKey"))) 15 | .AddIssuer(configuration.GetValue("JwtIssuer")) 16 | .AddAudience(configuration.GetValue("JwtAudience")) 17 | .AddExpiry(30) 18 | .AddClaim("Id", user.Id.ToString()) 19 | .AddRole("User") 20 | .Build(); 21 | 22 | user.Token = token.Value; 23 | } 24 | catch (Exception) 25 | { 26 | throw; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /NetCoreWebApi/JwtHelpers/JwtSecurityKey.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.IdentityModel.Tokens; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Wasalee.JwtHelpers 9 | { 10 | public static class JwtSecurityKey 11 | { 12 | public static SymmetricSecurityKey Create(string secret) 13 | { 14 | return new SymmetricSecurityKey(Encoding.ASCII.GetBytes(secret)); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NetCoreWebApi/JwtHelpers/JwtToken.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IdentityModel.Tokens.Jwt; 3 | 4 | namespace Wasalee.JwtHelpers 5 | { 6 | public sealed class JwtToken 7 | { 8 | private JwtSecurityToken token; 9 | 10 | internal JwtToken(JwtSecurityToken token) 11 | { 12 | this.token = token; 13 | } 14 | 15 | public DateTime ValidTo => token.ValidTo; 16 | public string Value => new JwtSecurityTokenHandler().WriteToken(this.token); 17 | } 18 | } -------------------------------------------------------------------------------- /NetCoreWebApi/JwtHelpers/JwtTokenBuilder.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.IdentityModel.Tokens; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IdentityModel.Tokens.Jwt; 5 | using System.Linq; 6 | using System.Security.Claims; 7 | using System.Threading.Tasks; 8 | 9 | namespace Wasalee.JwtHelpers 10 | { 11 | public sealed class JwtTokenBuilder 12 | { 13 | private SecurityKey securityKey = null; 14 | private string subject = ""; 15 | private string issuer = ""; 16 | private string audience = ""; 17 | private Dictionary claims = new Dictionary(); 18 | private int expiryInDays = 30; 19 | 20 | public JwtTokenBuilder AddSecurityKey(SecurityKey securityKey) 21 | { 22 | this.securityKey = securityKey; 23 | return this; 24 | } 25 | 26 | public JwtTokenBuilder AddSubject(string subject) 27 | { 28 | this.subject = subject; 29 | return this; 30 | } 31 | 32 | public JwtTokenBuilder AddIssuer(string issuer) 33 | { 34 | this.issuer = issuer; 35 | return this; 36 | } 37 | 38 | public JwtTokenBuilder AddAudience(string audience) 39 | { 40 | this.audience = audience; 41 | return this; 42 | } 43 | 44 | public JwtTokenBuilder AddClaim(string type, string value) 45 | { 46 | this.claims.Add(type, value); 47 | return this; 48 | } 49 | 50 | public JwtTokenBuilder AddRole(string value) 51 | { 52 | this.claims.Add(ClaimTypes.Role, value); 53 | return this; 54 | } 55 | 56 | public JwtTokenBuilder AddClaims(Dictionary claims) 57 | { 58 | this.claims.Union(claims); 59 | return this; 60 | } 61 | 62 | public JwtTokenBuilder AddExpiry(int expiryInDays) 63 | { 64 | this.expiryInDays = expiryInDays; 65 | return this; 66 | } 67 | 68 | public JwtTokenBuilder AddExpiryInDays(int expiryInDays) 69 | { 70 | this.expiryInDays = expiryInDays; 71 | return this; 72 | } 73 | 74 | public JwtToken Build() 75 | { 76 | EnsureArguments(); 77 | 78 | var claims = new List 79 | { 80 | new Claim(JwtRegisteredClaimNames.Sub, this.subject), 81 | new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()) 82 | } 83 | .Union(this.claims.Select(item => new Claim(item.Key, item.Value))); 84 | 85 | var token = new JwtSecurityToken( 86 | issuer: this.issuer, 87 | audience: this.audience, 88 | claims: claims, 89 | expires: DateTime.UtcNow.AddDays(expiryInDays), 90 | signingCredentials: new SigningCredentials( 91 | this.securityKey, 92 | SecurityAlgorithms.HmacSha256)); 93 | 94 | return new JwtToken(token); 95 | } 96 | 97 | #region " private " 98 | 99 | private void EnsureArguments() 100 | { 101 | if (this.securityKey == null) 102 | throw new ArgumentNullException("Security Key"); 103 | 104 | if (string.IsNullOrEmpty(this.issuer)) 105 | throw new ArgumentNullException("Issuer"); 106 | 107 | if (string.IsNullOrEmpty(this.audience)) 108 | throw new ArgumentNullException("Audience"); 109 | } 110 | 111 | #endregion 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /NetCoreWebApi/Migrations/20180721074414_Initial.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using JWTRoleBasedAuth.EntityContext; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Metadata; 6 | using Microsoft.EntityFrameworkCore.Migrations; 7 | using Microsoft.EntityFrameworkCore.Storage; 8 | using Microsoft.EntityFrameworkCore.Storage.Internal; 9 | using System; 10 | 11 | namespace JWTRoleBasedAuth.Migrations 12 | { 13 | [DbContext(typeof(DataContext))] 14 | [Migration("20180721074414_Initial")] 15 | partial class Initial 16 | { 17 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 18 | { 19 | #pragma warning disable 612, 618 20 | modelBuilder 21 | .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") 22 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 23 | 24 | modelBuilder.Entity("JWTRoleBasedAuth.EntityContext.User", b => 25 | { 26 | b.Property("Id") 27 | .ValueGeneratedOnAdd(); 28 | 29 | b.Property("Email"); 30 | 31 | b.Property("FirstName"); 32 | 33 | b.Property("LastName"); 34 | 35 | b.Property("Password"); 36 | 37 | b.HasKey("Id"); 38 | 39 | b.ToTable("Users"); 40 | }); 41 | #pragma warning restore 612, 618 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /NetCoreWebApi/Migrations/20180721074414_Initial.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Metadata; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace JWTRoleBasedAuth.Migrations 7 | { 8 | public partial class Initial : Migration 9 | { 10 | protected override void Up(MigrationBuilder migrationBuilder) 11 | { 12 | migrationBuilder.CreateTable( 13 | name: "Users", 14 | columns: table => new 15 | { 16 | Id = table.Column(type: "int", nullable: false) 17 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), 18 | Email = table.Column(type: "nvarchar(max)", nullable: true), 19 | FirstName = table.Column(type: "nvarchar(max)", nullable: true), 20 | LastName = table.Column(type: "nvarchar(max)", nullable: true), 21 | Password = table.Column(type: "nvarchar(max)", nullable: true) 22 | }, 23 | constraints: table => 24 | { 25 | table.PrimaryKey("PK_Users", x => x.Id); 26 | }); 27 | } 28 | 29 | protected override void Down(MigrationBuilder migrationBuilder) 30 | { 31 | migrationBuilder.DropTable( 32 | name: "Users"); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /NetCoreWebApi/Migrations/DataContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using JWTRoleBasedAuth.EntityContext; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Metadata; 6 | using Microsoft.EntityFrameworkCore.Migrations; 7 | using Microsoft.EntityFrameworkCore.Storage; 8 | using Microsoft.EntityFrameworkCore.Storage.Internal; 9 | using System; 10 | 11 | namespace JWTRoleBasedAuth.Migrations 12 | { 13 | [DbContext(typeof(DataContext))] 14 | partial class DataContextModelSnapshot : ModelSnapshot 15 | { 16 | protected override void BuildModel(ModelBuilder modelBuilder) 17 | { 18 | #pragma warning disable 612, 618 19 | modelBuilder 20 | .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") 21 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 22 | 23 | modelBuilder.Entity("JWTRoleBasedAuth.EntityContext.User", b => 24 | { 25 | b.Property("Id") 26 | .ValueGeneratedOnAdd(); 27 | 28 | b.Property("Email"); 29 | 30 | b.Property("FirstName"); 31 | 32 | b.Property("LastName"); 33 | 34 | b.Property("Password"); 35 | 36 | b.HasKey("Id"); 37 | 38 | b.ToTable("Users"); 39 | }); 40 | #pragma warning restore 612, 618 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /NetCoreWebApi/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace NetCoreWebApi 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | BuildWebHost(args).Run(); 18 | } 19 | 20 | public static IWebHost BuildWebHost(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup() 23 | .Build(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /NetCoreWebApi/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | FileSystem 9 | FileSystem 10 | Release 11 | Any CPU 12 | 13 | True 14 | False 15 | aab1694d-b183-4f11-9c27-349e1d46eddb 16 | bin\Release\PublishOutput 17 | False 18 | 19 | -------------------------------------------------------------------------------- /NetCoreWebApi/Properties/PublishProfiles/FolderProfile.pubxml.user: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | <_PublishTargetUrl>F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 10 | 11 | -------------------------------------------------------------------------------- /NetCoreWebApi/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:55015/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "launchUrl": "swagger", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "NetCoreWebApi": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "launchUrl": "api/values", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | }, 26 | "applicationUrl": "http://localhost:55016/" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /NetCoreWebApi/ScaffoldingReadMe.txt: -------------------------------------------------------------------------------- 1 |  2 | ASP.NET MVC core dependencies have been added to the project. 3 | (These dependencies include packages required to enable scaffolding) 4 | 5 | However you may still need to do make changes to your project. 6 | 7 | 1. Suggested changes to Startup class: 8 | 1.1 Add a constructor: 9 | public IConfiguration Configuration { get; } 10 | 11 | public Startup(IConfiguration configuration) 12 | { 13 | Configuration = configuration; 14 | } 15 | 1.2 Add MVC services: 16 | public void ConfigureServices(IServiceCollection services) 17 | { 18 | // Add framework services. 19 | services.AddMvc(); 20 | } 21 | 22 | 1.3 Configure web app to use use Configuration and use MVC routing: 23 | 24 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 25 | { 26 | if (env.IsDevelopment()) 27 | { 28 | app.UseDeveloperExceptionPage(); 29 | } 30 | 31 | app.UseStaticFiles(); 32 | 33 | app.UseMvc(routes => 34 | { 35 | routes.MapRoute( 36 | name: "default", 37 | template: "{controller=Home}/{action=Index}/{id?}"); 38 | }); 39 | } 40 | -------------------------------------------------------------------------------- /NetCoreWebApi/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.Configuration; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.AspNetCore.Authentication.JwtBearer; 6 | using Microsoft.EntityFrameworkCore; 7 | using Microsoft.IdentityModel.Tokens; 8 | using System.Text; 9 | using System.IO; 10 | using AutoMapper; 11 | using Wasalee.DTOs; 12 | using Swashbuckle.AspNetCore.Swagger; 13 | using JWTRoleBasedAuth.EntityContext; 14 | using System.Collections.Generic; 15 | using System.Linq; 16 | 17 | namespace NetCoreWebApi 18 | { 19 | public class Startup 20 | { 21 | public Startup(IConfiguration configuration) 22 | { 23 | Configuration = new ConfigurationBuilder() 24 | .SetBasePath(Directory.GetCurrentDirectory()) 25 | .AddJsonFile("appsettings.json") 26 | .Build(); 27 | } 28 | 29 | public IConfiguration Configuration { get; } 30 | 31 | // This method gets called by the runtime. Use this method to add services to the container. 32 | public void ConfigureServices(IServiceCollection services) 33 | { 34 | services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) 35 | .AddJwtBearer(options => 36 | { 37 | options.TokenValidationParameters = new TokenValidationParameters 38 | { 39 | ValidateIssuer = true, 40 | ValidateAudience = true, 41 | ValidateLifetime = true, 42 | ValidateIssuerSigningKey = true, 43 | ValidIssuer = Configuration.GetValue("JwtIssuer"), 44 | ValidAudience = Configuration.GetValue("JwtAudience"), 45 | IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(Configuration.GetValue("JwtSecretKey"))) 46 | }; 47 | }); 48 | 49 | services.AddDbContext(options => options.UseSqlServer(Configuration.GetValue("ConnectionString"), b => b.UseRowNumberForPaging())); 50 | 51 | services.AddMvc(); 52 | 53 | services.AddSwaggerGen(c => 54 | { 55 | c.SwaggerDoc("v1", new Info { Title = "JWTRoleBased API", Version = "v1" }); 56 | c.AddSecurityDefinition("Bearer", new ApiKeyScheme { In = "header", Description = "Please enter JWT with Bearer into field", Name = "Authorization", Type = "apiKey" }); 57 | c.AddSecurityRequirement(new Dictionary> { 58 | { "Bearer", Enumerable.Empty() }, 59 | }); 60 | 61 | }); 62 | 63 | Mapper.Initialize(cfg => 64 | { 65 | cfg.CreateMap(); 66 | }); 67 | 68 | } 69 | 70 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 71 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, DataContext dbContext) 72 | { 73 | if (env.IsDevelopment()) 74 | { 75 | app.UseDeveloperExceptionPage(); 76 | 77 | } 78 | 79 | app.UseAuthentication(); 80 | app.UseMvc(); 81 | app.UseSwagger(); 82 | app.UseSwaggerUI(c => 83 | { 84 | c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); 85 | }); 86 | 87 | dbContext.Database.EnsureCreated(); 88 | } 89 | 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /NetCoreWebApi/Utility/CryptoHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Security.Cryptography; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using Wasalee.ResponseFormats; 9 | 10 | namespace Wasalee.Utility 11 | { 12 | public class CryptoHelper 13 | { 14 | // This constant is used to determine the keysize of the encryption algorithm in bits. 15 | // We divide this by 8 within the code below to get the equivalent number of bytes. 16 | private const int Keysize = 256; 17 | 18 | private const string Key = "RestIngicPeace@"; 19 | // This constant determines the number of iterations for the password bytes generation function. 20 | private const int DerivationIterations = 1000; 21 | 22 | public static string Hash(string value) 23 | { 24 | try 25 | { 26 | StringBuilder Sb = new StringBuilder(); 27 | 28 | using (SHA256 hash = SHA256Managed.Create()) 29 | { 30 | Encoding enc = Encoding.UTF8; 31 | Byte[] result = hash.ComputeHash(enc.GetBytes(value)); 32 | 33 | foreach (Byte b in result) 34 | Sb.Append(b.ToString("x2")); 35 | } 36 | 37 | return Sb.ToString(); 38 | } 39 | catch (Exception ex) 40 | { 41 | Error.LogError(ex); 42 | return string.Empty; 43 | } 44 | 45 | } 46 | 47 | public static string CreatePasswordResetToken(DateTime passwordResetTokenExpiryDate, string modelEmail) 48 | { 49 | try 50 | { 51 | return Hash(modelEmail + passwordResetTokenExpiryDate.ToFileTime()); 52 | } 53 | catch (Exception ex) 54 | { 55 | Error.LogError(ex); 56 | return string.Empty; 57 | } 58 | 59 | } 60 | 61 | 62 | public static string Encrypt(string plainText) 63 | { 64 | try 65 | { 66 | string passPhrase = Key; 67 | // Salt and IV is randomly generated each time, but is preprended to encrypted cipher text 68 | // so that the same Salt and IV values can be used when decrypting. 69 | var saltStringBytes = Generate256BitsOfRandomEntropy(); 70 | var ivStringBytes = Generate256BitsOfRandomEntropy(); 71 | var plainTextBytes = Encoding.UTF8.GetBytes(plainText); 72 | using (var password = new Rfc2898DeriveBytes(passPhrase, saltStringBytes, DerivationIterations)) 73 | { 74 | var keyBytes = password.GetBytes(Keysize / 8); 75 | using (var symmetricKey = new RijndaelManaged()) 76 | { 77 | symmetricKey.BlockSize = 256; 78 | symmetricKey.Mode = CipherMode.CBC; 79 | symmetricKey.Padding = PaddingMode.PKCS7; 80 | using (var encryptor = symmetricKey.CreateEncryptor(keyBytes, ivStringBytes)) 81 | { 82 | using (var memoryStream = new MemoryStream()) 83 | { 84 | using (var cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write)) 85 | { 86 | cryptoStream.Write(plainTextBytes, 0, plainTextBytes.Length); 87 | cryptoStream.FlushFinalBlock(); 88 | // Create the final bytes as a concatenation of the random salt bytes, the random iv bytes and the cipher bytes. 89 | var cipherTextBytes = saltStringBytes; 90 | cipherTextBytes = cipherTextBytes.Concat(ivStringBytes).ToArray(); 91 | cipherTextBytes = cipherTextBytes.Concat(memoryStream.ToArray()).ToArray(); 92 | memoryStream.Close(); 93 | cryptoStream.Close(); 94 | return Convert.ToBase64String(cipherTextBytes); 95 | } 96 | } 97 | } 98 | } 99 | } 100 | } 101 | catch (Exception ex) 102 | { 103 | Error.LogError(ex); 104 | return string.Empty; 105 | } 106 | 107 | } 108 | 109 | public static string Decrypt(string cipherText) 110 | { 111 | try 112 | { 113 | string passPhrase = Key; 114 | // Get the complete stream of bytes that represent: 115 | // [32 bytes of Salt] + [32 bytes of IV] + [n bytes of CipherText] 116 | var cipherTextBytesWithSaltAndIv = Convert.FromBase64String(cipherText); 117 | // Get the saltbytes by extracting the first 32 bytes from the supplied cipherText bytes. 118 | var saltStringBytes = cipherTextBytesWithSaltAndIv.Take(Keysize / 8).ToArray(); 119 | // Get the IV bytes by extracting the next 32 bytes from the supplied cipherText bytes. 120 | var ivStringBytes = cipherTextBytesWithSaltAndIv.Skip(Keysize / 8).Take(Keysize / 8).ToArray(); 121 | // Get the actual cipher text bytes by removing the first 64 bytes from the cipherText string. 122 | var cipherTextBytes = cipherTextBytesWithSaltAndIv.Skip((Keysize / 8) * 2).Take(cipherTextBytesWithSaltAndIv.Length - ((Keysize / 8) * 2)).ToArray(); 123 | 124 | using (var password = new Rfc2898DeriveBytes(passPhrase, saltStringBytes, DerivationIterations)) 125 | { 126 | var keyBytes = password.GetBytes(Keysize / 8); 127 | using (var symmetricKey = new RijndaelManaged()) 128 | { 129 | symmetricKey.BlockSize = 256; 130 | symmetricKey.Mode = CipherMode.CBC; 131 | symmetricKey.Padding = PaddingMode.PKCS7; 132 | using (var decryptor = symmetricKey.CreateDecryptor(keyBytes, ivStringBytes)) 133 | { 134 | using (var memoryStream = new MemoryStream(cipherTextBytes)) 135 | { 136 | using (var cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read)) 137 | { 138 | var plainTextBytes = new byte[cipherTextBytes.Length]; 139 | var decryptedByteCount = cryptoStream.Read(plainTextBytes, 0, plainTextBytes.Length); 140 | memoryStream.Close(); 141 | cryptoStream.Close(); 142 | return Encoding.UTF8.GetString(plainTextBytes, 0, decryptedByteCount); 143 | } 144 | } 145 | } 146 | } 147 | } 148 | } 149 | catch (Exception ex) 150 | { 151 | Error.LogError(ex); 152 | return string.Empty; 153 | } 154 | 155 | } 156 | 157 | private static byte[] Generate256BitsOfRandomEntropy() 158 | { 159 | try 160 | { 161 | var randomBytes = new byte[32]; // 32 Bytes will give us 256 bits. 162 | using (var rngCsp = new RNGCryptoServiceProvider()) 163 | { 164 | // Fill the array with cryptographically secure random bytes. 165 | rngCsp.GetBytes(randomBytes); 166 | } 167 | return randomBytes; 168 | } 169 | catch (Exception ex) 170 | { 171 | Error.LogError(ex); 172 | return null; 173 | } 174 | 175 | } 176 | 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /NetCoreWebApi/Utility/CustomResponse.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | 8 | namespace Wasalee.ResponseFormats 9 | { 10 | public class CustomResponse 11 | { 12 | public string Message { get; set; } 13 | public int StatusCode { get; set; } 14 | public T Result { get; set; } 15 | } 16 | 17 | public class Error 18 | { 19 | public string ErrorMessage { get; set; } 20 | 21 | public static int LogError(Exception ex) 22 | { 23 | try 24 | { 25 | using (StreamWriter sw = File.AppendText(AppDomain.CurrentDomain.BaseDirectory + "/ErrorLog.txt")) 26 | { 27 | sw.WriteLine("DateTime : " + DateTime.Now + Environment.NewLine); 28 | if (ex.Message != null) 29 | { 30 | sw.WriteLine(Environment.NewLine + "Message" + ex.Message); 31 | sw.WriteLine(Environment.NewLine + "StackTrace" + ex.StackTrace); 32 | } 33 | again: if (ex.InnerException != null) 34 | { 35 | sw.WriteLine(Environment.NewLine + "Inner Exception : " + ex.InnerException.Message); 36 | } 37 | if (ex.InnerException.InnerException != null) 38 | { 39 | ex = ex.InnerException; 40 | goto again; 41 | } 42 | 43 | sw.WriteLine("------******------"); 44 | } 45 | return StatusCodes.Status500InternalServerError; 46 | } 47 | catch (Exception) 48 | { 49 | return StatusCodes.Status500InternalServerError; 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /NetCoreWebApi/Utility/Enums.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Wasalee.Utility 7 | { 8 | public enum UserTypes 9 | { 10 | User, 11 | Driver 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /NetCoreWebApi/Utility/ExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Claims; 5 | using System.Security.Principal; 6 | using System.Threading.Tasks; 7 | 8 | namespace Wasalee.Utility 9 | { 10 | public static class ExtensionMethods 11 | { 12 | public static string GetClaimValue(this IPrincipal currentPrincipal, string key) 13 | { 14 | var identity = currentPrincipal.Identity as ClaimsIdentity; 15 | if (identity == null) 16 | return null; 17 | 18 | var claim = identity.Claims.FirstOrDefault(c => c.Type == key); 19 | return claim?.Value; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /NetCoreWebApi/Utility/Global.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Wasalee.Utility 7 | { 8 | public static class Global 9 | { 10 | public class ResponseMessages 11 | { 12 | public const string Success = "Success"; 13 | public const string NotFound = "NotFound"; 14 | public const string BadRequest = "BadRequest"; 15 | public const string Conflict = "Conflict"; 16 | public const string Forbidden = "Forbidden"; 17 | 18 | public static string CannotBeEmpty(params string[] args) 19 | { 20 | try 21 | { 22 | string returnString = ""; 23 | for (int i = 0; i < args.Length; i++) 24 | returnString += args[i] + ", "; 25 | returnString = returnString.Remove(returnString.LastIndexOf(','), 1); 26 | return returnString + "cannot be empty"; 27 | } 28 | catch (Exception ex) 29 | { 30 | throw ex; 31 | } 32 | } 33 | 34 | public static string GenerateInvalid(params string[] args) 35 | { 36 | try 37 | { 38 | string returnString = ""; 39 | for (int i = 0; i < args.Length; i++) 40 | returnString += args[i] + ", "; 41 | returnString = returnString.Remove(returnString.LastIndexOf(','), 1); 42 | return "Invalid " + returnString; 43 | } 44 | catch (Exception ex) 45 | { 46 | throw ex; 47 | } 48 | } 49 | 50 | public static string GenerateAlreadyExists(string arg) 51 | { 52 | try 53 | { 54 | return arg + " already exists"; 55 | } 56 | catch (Exception ex) 57 | { 58 | throw ex; 59 | } 60 | } 61 | 62 | public static string GenerateNotFound(string arg) 63 | { 64 | try 65 | { 66 | return arg + " not found"; 67 | } 68 | catch (Exception ex) 69 | { 70 | throw ex; 71 | } 72 | } 73 | } 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /NetCoreWebApi/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Error"; 3 | } 4 | 5 |

Error.

6 |

An error occurred while processing your request.

7 | 8 |

Development Mode

9 |

10 | Swapping to Development environment will display more detailed information about the error that occurred. 11 |

12 |

13 | Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. 14 |

15 | -------------------------------------------------------------------------------- /NetCoreWebApi/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /NetCoreWebApi/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /NetCoreWebApi/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | }, 15 | "ConnectionString": "Data Source=ISB-APPS-F147; initial catalog=JwtRoleBasedAuth; integrated security=true", 16 | "JwtSecretKey": "travisgatesalksdjakljdkjsadfhkjsdfhjksdlfksdljfhsjkdlf-key", 17 | "JwtIssuer": "JwtRoleBasedAuth", 18 | "JwtAudience": "JwtRoleBasedAuth" 19 | } 20 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/BLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/BLL.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/BLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/BLL.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/DAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/DAL.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/DAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/DAL.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/ErrorLog.txt: -------------------------------------------------------------------------------- 1 | DateTime : 7/7/2018 1:59:34 PM 2 | 3 | 4 | MessageMapper not initialized. Call Initialize with appropriate configuration. If you are trying to use mapper instances through a container or otherwise, make sure you do not have any calls to the static Mapper.Map methods, and if you're using ProjectTo or UseAsDataSource extension methods, make sure you pass in the appropriate IConfigurationProvider instance. 5 | 6 | StackTrace at AutoMapper.Mapper.get_Instance() in C:\projects\automapper\src\AutoMapper\Mapper.cs:line 32 7 | at AutoMapper.Mapper.Map[TSource,TDestination](TSource source) in C:\projects\automapper\src\AutoMapper\Mapper.cs:line 92 8 | at NetCoreWebApi.Controllers.UsersController.Register(RegisterBindingModel model) in F:\VS\GitRepository\Wasalee\NetCoreWebApi\Controllers\UsersController.cs:line 65 9 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/JWTRoleBasedAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/JWTRoleBasedAuth.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/JWTRoleBasedAuth.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/JWTRoleBasedAuth.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/JWTRoleBasedAuth.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\muhammadmohsin\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\muhammadmohsin\\.nuget\\packages", 6 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/JWTRoleBasedAuth.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/NetCoreWebApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/NetCoreWebApi.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/NetCoreWebApi.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/NetCoreWebApi.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/NetCoreWebApi.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\muhammadmohsin\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\muhammadmohsin\\.nuget\\packages", 6 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/NetCoreWebApi.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/Wasalee.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/Wasalee.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/Wasalee.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Debug/netcoreapp2.0/Wasalee.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/Wasalee.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\muhammadmohsin\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\muhammadmohsin\\.nuget\\packages", 6 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/Wasalee.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Debug/netcoreapp2.0/swagger.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/AutoMapper.Extensions.Microsoft.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/AutoMapper.Extensions.Microsoft.DependencyInjection.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/AutoMapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/AutoMapper.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/BLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/BLL.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/BLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/BLL.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/DAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/DAL.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/DAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/DAL.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.CodeAnalysis.CSharp.Workspaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.CodeAnalysis.CSharp.Workspaces.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.CodeAnalysis.Workspaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.CodeAnalysis.Workspaces.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.EntityFrameworkCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.EntityFrameworkCore.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Caching.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Caching.Abstractions.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Caching.Memory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Caching.Memory.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Logging.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Logging.Abstractions.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Logging.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Options.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.Extensions.Options.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.Core.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGeneration.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/NuGet.Frameworks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/NuGet.Frameworks.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Swashbuckle.AspNetCore.Swagger.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Swashbuckle.AspNetCore.Swagger.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Swashbuckle.AspNetCore.SwaggerGen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Swashbuckle.AspNetCore.SwaggerGen.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Swashbuckle.AspNetCore.SwaggerUI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Swashbuckle.AspNetCore.SwaggerUI.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Swashbuckle.AspNetCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Swashbuckle.AspNetCore.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/System.Composition.AttributedModel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/System.Composition.AttributedModel.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/System.Composition.Convention.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/System.Composition.Convention.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/System.Composition.Hosting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/System.Composition.Hosting.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/System.Composition.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/System.Composition.Runtime.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/System.Composition.TypedParts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/System.Composition.TypedParts.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Wasalee.PrecompiledViews.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Wasalee.PrecompiledViews.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Wasalee.PrecompiledViews.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Wasalee.PrecompiledViews.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Wasalee.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Wasalee.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Wasalee.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/Wasalee.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/Wasalee.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | }, 15 | "WasaleeConnectionString": "Data Source=ISB-APPS-F147; initial catalog=Wasalee; integrated security=true", 16 | "JwtSecretKey": "travisgatesalksdjakljdkjsadfhkjsdfhjksdlfksdljfhsjkdlf-key", 17 | "JwtIssuer": "Wasalee", 18 | "JwtAudience": "Wasalee" 19 | } 20 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/dotnet-aspnet-codegenerator-design.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/PublishOutput/dotnet-aspnet-codegenerator-design.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_19848_20187911859.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:3006 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_21772_20187108040.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:19439 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_27268_20187911229.log: -------------------------------------------------------------------------------- 1 | Application startup exception: System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'AXACT\ISB-APPS-F147$'. 2 | at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) 3 | at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) 4 | at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) 5 | at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) 6 | at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) 7 | at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) 8 | at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) 9 | at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) 10 | at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 11 | at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 12 | at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) 13 | at System.Data.SqlClient.SqlConnection.Open() 14 | at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected) 15 | at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerDatabaseCreator.<>c__DisplayClass18_0.b__0(DateTime giveUp) 16 | at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.<>c__DisplayClass12_0`2.b__0(DbContext c, TState s) 17 | at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded) 18 | at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.Execute[TState,TResult](IExecutionStrategy strategy, Func`2 operation, Func`2 verifySucceeded, TState state) 19 | at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.Execute[TState,TResult](IExecutionStrategy strategy, TState state, Func`2 operation) 20 | at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerDatabaseCreator.Exists(Boolean retryOnNotExists) 21 | at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerDatabaseCreator.Exists() 22 | at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.EnsureCreated() 23 | at NetCoreWebApi.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, DataContext dbContext) in F:\VS\GitRepository\Wasalee\NetCoreWebApi\Startup.cs:line 100 24 | --- End of stack trace from previous location where exception was thrown --- 25 | at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 26 | at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app) 27 | at Microsoft.AspNetCore.Server.IISIntegration.IISSetupFilter.<>c__DisplayClass3_0.b__0(IApplicationBuilder app) 28 | at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.b__0(IApplicationBuilder builder) 29 | at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() 30 | ClientConnectionId:67c4259e-baee-4fd0-a7ab-0f62a09a8e42 31 | Error Number:18456,State:1,Class:14 32 | crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6] 33 | Application startup exception 34 | System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'AXACT\ISB-APPS-F147$'. 35 | at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling) 36 | at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) 37 | at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) 38 | at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) 39 | at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) 40 | at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) 41 | at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) 42 | at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) 43 | at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 44 | at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) 45 | at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) 46 | at System.Data.SqlClient.SqlConnection.Open() 47 | at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected) 48 | at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerDatabaseCreator.<>c__DisplayClass18_0.b__0(DateTime giveUp) 49 | at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.<>c__DisplayClass12_0`2.b__0(DbContext c, TState s) 50 | at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded) 51 | at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.Execute[TState,TResult](IExecutionStrategy strategy, Func`2 operation, Func`2 verifySucceeded, TState state) 52 | at Microsoft.EntityFrameworkCore.ExecutionStrategyExtensions.Execute[TState,TResult](IExecutionStrategy strategy, TState state, Func`2 operation) 53 | at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerDatabaseCreator.Exists(Boolean retryOnNotExists) 54 | at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerDatabaseCreator.Exists() 55 | at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.EnsureCreated() 56 | at NetCoreWebApi.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, DataContext dbContext) in F:\VS\GitRepository\Wasalee\NetCoreWebApi\Startup.cs:line 100 57 | --- End of stack trace from previous location where exception was thrown --- 58 | at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 59 | at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app) 60 | at Microsoft.AspNetCore.Server.IISIntegration.IISSetupFilter.<>c__DisplayClass3_0.b__0(IApplicationBuilder app) 61 | at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.b__0(IApplicationBuilder builder) 62 | at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() 63 | ClientConnectionId:67c4259e-baee-4fd0-a7ab-0f62a09a8e42 64 | Error Number:18456,State:1,Class:14 65 | Hosting environment: Production 66 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 67 | Now listening on: http://localhost:9423 68 | Application started. Press Ctrl+C to shut down. 69 | Application is shutting down... 70 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_34836_201871311494.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:17315 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_35688_2018712115637.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:10336 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_36952_2018713101826.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:17411 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_40220_20187145344.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:20694 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_42684_201871210275.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:29300 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_42704_201871310514.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:24004 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/logs/stdout_7560_2018712784.log: -------------------------------------------------------------------------------- 1 | Hosting environment: Production 2 | Content root path: F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\PublishOutput 3 | Now listening on: http://localhost:28531 4 | Application started. Press Ctrl+C to shut down. 5 | Application is shutting down... 6 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/PublishOutput/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/netcoreapp2.0/BLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/netcoreapp2.0/BLL.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/netcoreapp2.0/BLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/netcoreapp2.0/BLL.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/netcoreapp2.0/DAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/netcoreapp2.0/DAL.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/netcoreapp2.0/DAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/netcoreapp2.0/DAL.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/netcoreapp2.0/Wasalee.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/netcoreapp2.0/Wasalee.dll -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/netcoreapp2.0/Wasalee.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/bin/Release/netcoreapp2.0/Wasalee.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/netcoreapp2.0/Wasalee.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\muhammadmohsin\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\muhammadmohsin\\.nuget\\packages", 6 | "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /NetCoreWebApi/bin/Release/netcoreapp2.0/Wasalee.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("JWTRoleBasedAuth")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("JWTRoleBasedAuth")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("JWTRoleBasedAuth")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 22 | 23 | // Generated by the MSBuild WriteCodeFragment class. 24 | 25 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | e6e9fabe0d05a001d00190748c40fd34956b9383 2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | b557dd56c92ad46ae74d8cdfb9ec2ac7da922fc9 2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\obj\Debug\netcoreapp2.0\JWTRoleBasedAuth.csproj.CoreCompileInputs.cache 2 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\obj\Debug\netcoreapp2.0\JWTRoleBasedAuth.AssemblyInfoInputs.cache 3 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\obj\Debug\netcoreapp2.0\JWTRoleBasedAuth.AssemblyInfo.cs 4 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\bin\Debug\netcoreapp2.0\JWTRoleBasedAuth.deps.json 5 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\bin\Debug\netcoreapp2.0\JWTRoleBasedAuth.runtimeconfig.json 6 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\bin\Debug\netcoreapp2.0\JWTRoleBasedAuth.runtimeconfig.dev.json 7 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\bin\Debug\netcoreapp2.0\JWTRoleBasedAuth.dll 8 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\bin\Debug\netcoreapp2.0\JWTRoleBasedAuth.pdb 9 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\obj\Debug\netcoreapp2.0\JWTRoleBasedAuth.dll 10 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\obj\Debug\netcoreapp2.0\JWTRoleBasedAuth.pdb 11 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\obj\Debug\netcoreapp2.0\JWTRoleBasedAuth.csprojResolveAssemblyReference.cache 12 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/JWTRoleBasedAuth.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("NetCoreWebApi")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("NetCoreWebApi")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("NetCoreWebApi")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 22 | 23 | // Generated by the MSBuild WriteCodeFragment class. 24 | 25 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 42c700eeadc3b3dd6a8bc7f1816c077bf531e7a6 2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 8b107750b4555c87fcd959ed44a9c4dcb88348eb 2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\NetCoreWebApi.deps.json 2 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\NetCoreWebApi.runtimeconfig.json 3 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\NetCoreWebApi.runtimeconfig.dev.json 4 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\NetCoreWebApi.dll 5 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\NetCoreWebApi.pdb 6 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\NetCoreWebApi.csprojResolveAssemblyReference.cache 7 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\NetCoreWebApi.csproj.CoreCompileInputs.cache 8 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\NetCoreWebApi.AssemblyInfoInputs.cache 9 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\NetCoreWebApi.AssemblyInfo.cs 10 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\NetCoreWebApi.dll 11 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\NetCoreWebApi.pdb 12 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/NetCoreWebApi.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("Wasalee")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("Wasalee")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("Wasalee")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 22 | 23 | // Generated by the MSBuild WriteCodeFragment class. 24 | 25 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | ee7bfe8d6c06993ce5a7713aa577770c8ab98a13 2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.csproj.CopyComplete -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 1e1aa59586680ef3ef650d76e379587c4d343c44 2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.deps.json 2 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.runtimeconfig.json 3 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.runtimeconfig.dev.json 4 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.dll 5 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.pdb 6 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.csprojResolveAssemblyReference.cache 7 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.csproj.CoreCompileInputs.cache 8 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.AssemblyInfoInputs.cache 9 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.AssemblyInfo.cs 10 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.dll 11 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.pdb 12 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\DAL.dll 13 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\bin\Debug\netcoreapp2.0\DAL.pdb 14 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.csprojResolveAssemblyReference.cache 15 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.csproj.CoreCompileInputs.cache 16 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.AssemblyInfoInputs.cache 17 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.AssemblyInfo.cs 18 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.deps.json 19 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.runtimeconfig.json 20 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.runtimeconfig.dev.json 21 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.dll 22 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\BLL.dll 23 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\DAL.dll 24 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\BLL.pdb 25 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\DAL.pdb 26 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Debug\netcoreapp2.0\Wasalee.pdb 27 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.dll 28 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Debug\netcoreapp2.0\Wasalee.pdb 29 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Debug/netcoreapp2.0/Wasalee.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/JWTRoleBasedAuth.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "JjFVhi8Wz1WGXIPm7ehb6zlSxpWPOiGJXTCBTnE4x0Onb9AIXq1w/1F9fLCwq+iz0JPUwf2Z5Td+K5q864iIIw==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /NetCoreWebApi/obj/JWTRoleBasedAuth.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | F:\VS\GitRepository\JWT Role Based Auth with Custom Tables Identity\NetCoreWebApi\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\muhammadmohsin\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/JWTRoleBasedAuth.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/NetCoreWebApi.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "/bsJlJ+BWXxX/Rb0X4liozNOVhqGpqHiXAoLpIfudGQJC67L/IMrHtGIriWLiHpH7aXc26VGxhapyPHeJMxV/g==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /NetCoreWebApi/obj/NetCoreWebApi.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | F:\VS\GitRepository\NetCoreWebApi\NetCoreWebApi\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\muhammadmohsin\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/NetCoreWebApi.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/AutoMapper.Extensions.Microsoft.DependencyInjection.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/AutoMapper.Extensions.Microsoft.DependencyInjection.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/AutoMapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/AutoMapper.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/BLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/BLL.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/BLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/BLL.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/DAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/DAL.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/DAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/DAL.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.CodeAnalysis.CSharp.Workspaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.CodeAnalysis.CSharp.Workspaces.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.CodeAnalysis.Workspaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.CodeAnalysis.Workspaces.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.EntityFrameworkCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.EntityFrameworkCore.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Caching.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Caching.Abstractions.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Caching.Memory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Caching.Memory.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Logging.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Logging.Abstractions.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Logging.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Options.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.Extensions.Options.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.Core.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.Templating.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.Utils.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGeneration.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Microsoft.VisualStudio.Web.CodeGenerators.Mvc.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/NuGet.Frameworks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/NuGet.Frameworks.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Swashbuckle.AspNetCore.Swagger.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Swashbuckle.AspNetCore.Swagger.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Swashbuckle.AspNetCore.SwaggerGen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Swashbuckle.AspNetCore.SwaggerGen.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Swashbuckle.AspNetCore.SwaggerUI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Swashbuckle.AspNetCore.SwaggerUI.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Swashbuckle.AspNetCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Swashbuckle.AspNetCore.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.AttributedModel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.AttributedModel.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.Convention.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.Convention.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.Hosting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.Hosting.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.Runtime.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.TypedParts.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/System.Composition.TypedParts.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.PrecompiledViews.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.PrecompiledViews.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.PrecompiledViews.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.PrecompiledViews.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/Wasalee.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp2.0", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "2.0.0" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "Debug": { 5 | "LogLevel": { 6 | "Default": "Warning" 7 | } 8 | }, 9 | "Console": { 10 | "LogLevel": { 11 | "Default": "Warning" 12 | } 13 | } 14 | }, 15 | "WasaleeConnectionString": "Data Source=ISB-APPS-F147; initial catalog=Wasalee; integrated security=true", 16 | "JwtSecretKey": "travisgatesalksdjakljdkjsadfhkjsdfhjksdlfksdljfhsjkdlf-key", 17 | "JwtIssuer": "Wasalee", 18 | "JwtAudience": "Wasalee" 19 | } 20 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/dotnet-aspnet-codegenerator-design.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/dotnet-aspnet-codegenerator-design.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/swagger.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/PubTmp/Out/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("Wasalee")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] 16 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("Wasalee")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("Wasalee")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 22 | 23 | // Generated by the MSBuild WriteCodeFragment class. 24 | 25 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | b976cfb6628a523eaf05d734e23f5c749b39440e 2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.PrecompiledViews.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.PrecompiledViews.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.PrecompiledViews.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.PrecompiledViews.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.csproj.CopyComplete -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 2fb278ba6e07e0101b51d0735c9a4493399d51c9 2 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\Wasalee.deps.json 2 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\Wasalee.runtimeconfig.json 3 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\Wasalee.runtimeconfig.dev.json 4 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\Wasalee.dll 5 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\Wasalee.pdb 6 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\BLL.dll 7 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\DAL.dll 8 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\BLL.pdb 9 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\bin\Release\netcoreapp2.0\DAL.pdb 10 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Release\netcoreapp2.0\Wasalee.csprojResolveAssemblyReference.cache 11 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Release\netcoreapp2.0\Wasalee.csproj.CoreCompileInputs.cache 12 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Release\netcoreapp2.0\Wasalee.AssemblyInfoInputs.cache 13 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Release\netcoreapp2.0\Wasalee.AssemblyInfo.cs 14 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Release\netcoreapp2.0\Wasalee.dll 15 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\Release\netcoreapp2.0\Wasalee.pdb 16 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.dll -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsin91/NetCore2JWTRoleBasedAuth/ade33695493fe2f81c075fa7fe70f8063dde58af/NetCoreWebApi/obj/Release/netcoreapp2.0/Wasalee.pdb -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Release/netcoreapp2.0/microsoft.aspnetcore.mvc.razor.viewcompilation.rsp: -------------------------------------------------------------------------------- 1 | F:\VS\GitRepository\Wasalee\NetCoreWebApi 2 | --output-path=obj\Release\netcoreapp2.0\ 3 | --application-name=Wasalee 4 | --content-root=F:\VS\GitRepository\Wasalee\NetCoreWebApi 5 | --file=F:\VS\GitRepository\Wasalee\NetCoreWebApi\Views\Shared\Error.cshtml 6 | --file=F:\VS\GitRepository\Wasalee\NetCoreWebApi\Views\_ViewStart.cshtml 7 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Wasalee.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "/j/70jjxDF4riruJ2A2W8IS7OiklyGETLVSP6hiNAUqSjeVGOVLx3hqGAzZ7hwajZMT3SIHVT0PCSqeSTOSD3Q==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Wasalee.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | F:\VS\GitRepository\Wasalee\NetCoreWebApi\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\muhammadmohsin\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.0 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /NetCoreWebApi/obj/Wasalee.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /NetCoreWebApi/swagger.json: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NetCore2JWTRoleBasedAuth 2 | 3 | This code is an implementation of JWT Role Base Authorization with Custom Tables. 4 | 5 | We are using EntityFramework with Sql. In order to use MySql, you just have to use options.UseMySql in ConfigureServices of Startup.cs 6 | instead of options.UseSql. 7 | 8 | Use Cases: 9 | 10 | 1. When a user logs in with valid credentials, a token is returned. 11 | 2. When user tries to access an Api controller action decorated with [Authorize] with an invalid token or no token at all. It will return 12 | 401 Unauthorized status code. 13 | 3. When user tries to access an action whom access is only provided to admin(with a valid token though), it will return a 403 Forbidden 14 | status code. 15 | --------------------------------------------------------------------------------