├── Angular5 ├── .angular-cli.json ├── .editorconfig ├── .gitignore ├── README.md ├── e2e │ ├── app.e2e-spec.ts │ ├── app.po.ts │ └── tsconfig.e2e.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── protractor.conf.js ├── src │ ├── app │ │ ├── admin-panel │ │ │ ├── admin-panel.component.css │ │ │ ├── admin-panel.component.html │ │ │ ├── admin-panel.component.spec.ts │ │ │ └── admin-panel.component.ts │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── auth │ │ │ ├── auth.guard.spec.ts │ │ │ ├── auth.guard.ts │ │ │ └── auth.interceptor.ts │ │ ├── forbidden │ │ │ ├── forbidden.component.css │ │ │ ├── forbidden.component.html │ │ │ ├── forbidden.component.spec.ts │ │ │ └── forbidden.component.ts │ │ ├── home │ │ │ ├── home.component.css │ │ │ ├── home.component.html │ │ │ ├── home.component.spec.ts │ │ │ └── home.component.ts │ │ ├── routes.ts │ │ ├── shared │ │ │ ├── user.model.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ │ └── user │ │ │ ├── sign-in │ │ │ ├── sign-in.component.css │ │ │ ├── sign-in.component.html │ │ │ ├── sign-in.component.spec.ts │ │ │ └── sign-in.component.ts │ │ │ ├── sign-up │ │ │ ├── sign-up.component.css │ │ │ ├── sign-up.component.html │ │ │ ├── sign-up.component.spec.ts │ │ │ └── sign-up.component.ts │ │ │ ├── user.component.css │ │ │ ├── user.component.html │ │ │ ├── user.component.spec.ts │ │ │ └── user.component.ts │ ├── assets │ │ ├── .gitkeep │ │ └── img │ │ │ └── 403.png │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.css │ ├── test.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ └── typings.d.ts ├── tsconfig.json └── tslint.json ├── README.md └── WebAPI ├── WebAPI.sln ├── WebAPI.v12.suo ├── WebAPI ├── App_Start │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── RouteConfig.cs │ └── WebApiConfig.cs ├── ApplicationOAuthProvider.cs ├── Areas │ └── HelpPage │ │ ├── ApiDescriptionExtensions.cs │ │ ├── App_Start │ │ └── HelpPageConfig.cs │ │ ├── Controllers │ │ └── HelpController.cs │ │ ├── HelpPage.css │ │ ├── HelpPageAreaRegistration.cs │ │ ├── HelpPageConfigurationExtensions.cs │ │ ├── Models │ │ └── HelpPageApiModel.cs │ │ ├── SampleGeneration │ │ ├── HelpPageSampleGenerator.cs │ │ ├── HelpPageSampleKey.cs │ │ ├── ImageSample.cs │ │ ├── InvalidSample.cs │ │ ├── ObjectGenerator.cs │ │ ├── SampleDirection.cs │ │ └── TextSample.cs │ │ ├── Views │ │ ├── Help │ │ │ ├── Api.cshtml │ │ │ ├── DisplayTemplates │ │ │ │ ├── ApiGroup.cshtml │ │ │ │ ├── HelpPageApiModel.cshtml │ │ │ │ ├── ImageSample.cshtml │ │ │ │ ├── InvalidSample.cshtml │ │ │ │ ├── Parameters.cshtml │ │ │ │ ├── Samples.cshtml │ │ │ │ └── TextSample.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ └── _Layout.cshtml │ │ ├── Web.config │ │ └── _ViewStart.cshtml │ │ └── XmlDocumentationProvider.cs ├── AuthorizeAttribute.cs ├── Content │ ├── Site.css │ ├── bootstrap.css │ └── bootstrap.min.css ├── Controllers │ ├── AccountController.cs │ ├── HomeController.cs │ ├── RoleController.cs │ └── ValuesController.cs ├── Global.asax ├── Global.asax.cs ├── Migrations │ ├── 201801311530466_InitailDB.Designer.cs │ ├── 201801311530466_InitailDB.cs │ ├── 201801311530466_InitailDB.resx │ ├── 201801311540510_ChangedDefaultTableNames.Designer.cs │ ├── 201801311540510_ChangedDefaultTableNames.cs │ ├── 201801311540510_ChangedDefaultTableNames.resx │ ├── 201801311545174_ChangedDefaultColumnNames.Designer.cs │ ├── 201801311545174_ChangedDefaultColumnNames.cs │ ├── 201801311545174_ChangedDefaultColumnNames.resx │ └── Configuration.cs ├── Models │ ├── AccountModel.cs │ └── IdentityModels.cs ├── Project_Readme.html ├── Properties │ └── AssemblyInfo.cs ├── Scripts │ ├── _references.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.10.2.intellisense.js │ ├── jquery-1.10.2.js │ ├── jquery-1.10.2.min.js │ ├── jquery-1.10.2.min.map │ ├── modernizr-2.6.2.js │ ├── respond.js │ └── respond.min.js ├── Startup.cs ├── Views │ ├── Home │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ └── _Layout.cshtml │ ├── Web.config │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── WebAPI.csproj ├── WebAPI.csproj.user ├── bin │ ├── Antlr3.Runtime.dll │ ├── Antlr3.Runtime.pdb │ ├── EntityFramework.SqlServer.dll │ ├── EntityFramework.SqlServer.xml │ ├── EntityFramework.dll │ ├── EntityFramework.xml │ ├── Microsoft.AspNet.Identity.Core.dll │ ├── Microsoft.AspNet.Identity.Core.xml │ ├── Microsoft.AspNet.Identity.EntityFramework.dll │ ├── Microsoft.AspNet.Identity.EntityFramework.xml │ ├── Microsoft.AspNet.Identity.Owin.dll │ ├── Microsoft.AspNet.Identity.Owin.xml │ ├── Microsoft.Owin.Cors.dll │ ├── Microsoft.Owin.Cors.xml │ ├── Microsoft.Owin.Host.SystemWeb.dll │ ├── Microsoft.Owin.Host.SystemWeb.xml │ ├── Microsoft.Owin.Security.Cookies.dll │ ├── Microsoft.Owin.Security.Cookies.xml │ ├── Microsoft.Owin.Security.OAuth.dll │ ├── Microsoft.Owin.Security.OAuth.xml │ ├── Microsoft.Owin.Security.dll │ ├── Microsoft.Owin.Security.xml │ ├── Microsoft.Owin.dll │ ├── Microsoft.Owin.xml │ ├── Microsoft.Web.Infrastructure.dll │ ├── Newtonsoft.Json.dll │ ├── Newtonsoft.Json.xml │ ├── Owin.dll │ ├── System.Net.Http.Formatting.dll │ ├── System.Net.Http.Formatting.xml │ ├── System.Web.Cors.dll │ ├── System.Web.Helpers.dll │ ├── System.Web.Helpers.xml │ ├── System.Web.Http.Cors.dll │ ├── System.Web.Http.Cors.xml │ ├── System.Web.Http.WebHost.dll │ ├── System.Web.Http.WebHost.xml │ ├── System.Web.Http.dll │ ├── System.Web.Http.xml │ ├── System.Web.Mvc.dll │ ├── System.Web.Mvc.xml │ ├── System.Web.Optimization.dll │ ├── System.Web.Optimization.xml │ ├── System.Web.Razor.dll │ ├── System.Web.Razor.xml │ ├── System.Web.WebPages.Deployment.dll │ ├── System.Web.WebPages.Deployment.xml │ ├── System.Web.WebPages.Razor.dll │ ├── System.Web.WebPages.Razor.xml │ ├── System.Web.WebPages.dll │ ├── System.Web.WebPages.xml │ ├── WebAPI.dll │ ├── WebAPI.dll.config │ ├── WebAPI.pdb │ └── WebGrease.dll ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── obj │ └── Debug │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ ├── WebAPI.Migrations.ChangedDefaultColumnNames.resources │ │ ├── WebAPI.Migrations.ChangedDefaultTableNames.resources │ │ ├── WebAPI.Migrations.InitailDB.resources │ │ ├── WebAPI.csproj.FileListAbsolute.txt │ │ ├── WebAPI.csproj.GenerateResource.Cache │ │ ├── WebAPI.csprojResolveAssemblyReference.cache │ │ ├── WebAPI.dll │ │ └── WebAPI.pdb └── packages.config └── packages ├── Antlr.3.4.1.9004 ├── Antlr.3.4.1.9004.nupkg ├── Antlr.3.4.1.9004.nuspec └── lib │ ├── Antlr3.Runtime.dll │ └── Antlr3.Runtime.pdb ├── EntityFramework.6.1.3 ├── EntityFramework.6.1.3.nupkg ├── EntityFramework.6.1.3.nuspec ├── content │ ├── App.config.transform │ └── Web.config.transform ├── lib │ ├── net40 │ │ ├── EntityFramework.SqlServer.dll │ │ ├── EntityFramework.SqlServer.xml │ │ ├── EntityFramework.dll │ │ └── EntityFramework.xml │ └── net45 │ │ ├── EntityFramework.SqlServer.dll │ │ ├── EntityFramework.SqlServer.xml │ │ ├── EntityFramework.dll │ │ └── EntityFramework.xml └── tools │ ├── EntityFramework.PowerShell.Utility.dll │ ├── EntityFramework.PowerShell.dll │ ├── EntityFramework.psd1 │ ├── EntityFramework.psm1 │ ├── about_EntityFramework.help.txt │ ├── init.ps1 │ ├── install.ps1 │ └── migrate.exe ├── Microsoft.AspNet.Cors.5.2.3 ├── Microsoft.AspNet.Cors.5.2.3.nupkg ├── Microsoft.AspNet.Cors.5.2.3.nuspec └── lib │ └── net45 │ └── System.Web.Cors.dll ├── Microsoft.AspNet.Identity.Core.2.2.1 ├── Microsoft.AspNet.Identity.Core.2.2.1.nupkg ├── Microsoft.AspNet.Identity.Core.2.2.1.nuspec └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.Core.dll │ └── Microsoft.AspNet.Identity.Core.xml ├── Microsoft.AspNet.Identity.EntityFramework.2.2.1 ├── Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg ├── Microsoft.AspNet.Identity.EntityFramework.2.2.1.nuspec └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.EntityFramework.dll │ └── Microsoft.AspNet.Identity.EntityFramework.xml ├── Microsoft.AspNet.Identity.Owin.2.2.1 ├── Microsoft.AspNet.Identity.Owin.2.2.1.nupkg ├── Microsoft.AspNet.Identity.Owin.2.2.1.nuspec └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.Owin.dll │ └── Microsoft.AspNet.Identity.Owin.xml ├── Microsoft.AspNet.Mvc.5.0.0 ├── Microsoft.AspNet.Mvc.5.0.0.nupkg ├── Microsoft.AspNet.Mvc.5.0.0.nuspec └── lib │ └── net45 │ ├── System.Web.Mvc.dll │ └── System.Web.Mvc.xml ├── Microsoft.AspNet.Razor.3.0.0 ├── Microsoft.AspNet.Razor.3.0.0.nupkg ├── Microsoft.AspNet.Razor.3.0.0.nuspec └── lib │ └── net45 │ ├── System.Web.Razor.dll │ └── System.Web.Razor.xml ├── Microsoft.AspNet.Web.Optimization.1.1.1 ├── Microsoft.AspNet.Web.Optimization.1.1.1.nupkg ├── Microsoft.AspNet.Web.Optimization.1.1.1.nuspec └── lib │ └── net40 │ ├── System.Web.Optimization.dll │ └── system.web.optimization.xml ├── Microsoft.AspNet.WebApi.5.0.0 ├── Microsoft.AspNet.WebApi.5.0.0.nupkg └── Microsoft.AspNet.WebApi.5.0.0.nuspec ├── Microsoft.AspNet.WebApi.Client.5.2.3 ├── Microsoft.AspNet.WebApi.Client.5.2.3.nupkg ├── Microsoft.AspNet.WebApi.Client.5.2.3.nuspec └── lib │ ├── net45 │ ├── System.Net.Http.Formatting.dll │ └── System.Net.Http.Formatting.xml │ └── portable-wp8+netcore45+net45+wp81+wpa81 │ ├── System.Net.Http.Formatting.dll │ └── System.Net.Http.Formatting.xml ├── Microsoft.AspNet.WebApi.Core.5.2.3 ├── Content │ └── web.config.transform ├── Microsoft.AspNet.WebApi.Core.5.2.3.nupkg ├── Microsoft.AspNet.WebApi.Core.5.2.3.nuspec └── lib │ └── net45 │ ├── System.Web.Http.dll │ └── System.Web.Http.xml ├── Microsoft.AspNet.WebApi.Cors.5.2.3 ├── Microsoft.AspNet.WebApi.Cors.5.2.3.nupkg ├── Microsoft.AspNet.WebApi.Cors.5.2.3.nuspec └── lib │ └── net45 │ ├── System.Web.Http.Cors.dll │ └── System.Web.Http.Cors.xml ├── Microsoft.AspNet.WebApi.HelpPage.5.0.0 ├── Microsoft.AspNet.WebApi.HelpPage.5.0.0.nupkg ├── Microsoft.AspNet.WebApi.HelpPage.5.0.0.nuspec └── content │ └── Areas │ └── HelpPage │ ├── ApiDescriptionExtensions.cs.pp │ ├── App_Start │ └── HelpPageConfig.cs.pp │ ├── Controllers │ └── HelpController.cs.pp │ ├── HelpPage.css.pp │ ├── HelpPageAreaRegistration.cs.pp │ ├── HelpPageConfigurationExtensions.cs.pp │ ├── Models │ └── HelpPageApiModel.cs.pp │ ├── SampleGeneration │ ├── HelpPageSampleGenerator.cs.pp │ ├── HelpPageSampleKey.cs.pp │ ├── ImageSample.cs.pp │ ├── InvalidSample.cs.pp │ ├── ObjectGenerator.cs.pp │ ├── SampleDirection.cs.pp │ └── TextSample.cs.pp │ ├── Views │ ├── Help │ │ ├── Api.cshtml.pp │ │ ├── DisplayTemplates │ │ │ ├── ApiGroup.cshtml.pp │ │ │ ├── HelpPageApiModel.cshtml.pp │ │ │ ├── ImageSample.cshtml.pp │ │ │ ├── InvalidSample.cshtml.pp │ │ │ ├── Parameters.cshtml.pp │ │ │ ├── Samples.cshtml.pp │ │ │ └── TextSample.cshtml.pp │ │ └── Index.cshtml.pp │ ├── Shared │ │ └── _Layout.cshtml.pp │ ├── Web.config │ └── _ViewStart.cshtml.pp │ └── XmlDocumentationProvider.cs.pp ├── Microsoft.AspNet.WebApi.WebHost.5.2.3 ├── Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg ├── Microsoft.AspNet.WebApi.WebHost.5.2.3.nuspec └── lib │ └── net45 │ ├── System.Web.Http.WebHost.dll │ └── System.Web.Http.WebHost.xml ├── Microsoft.AspNet.WebPages.3.0.0 ├── Microsoft.AspNet.WebPages.3.0.0.nupkg ├── Microsoft.AspNet.WebPages.3.0.0.nuspec └── lib │ └── net45 │ ├── System.Web.Helpers.dll │ ├── System.Web.Helpers.xml │ ├── System.Web.WebPages.Deployment.dll │ ├── System.Web.WebPages.Deployment.xml │ ├── System.Web.WebPages.Razor.dll │ ├── System.Web.WebPages.Razor.xml │ ├── System.Web.WebPages.dll │ └── System.Web.WebPages.xml ├── Microsoft.Owin.3.1.0 ├── Microsoft.Owin.3.1.0.nupkg ├── Microsoft.Owin.3.1.0.nuspec └── lib │ └── net45 │ ├── Microsoft.Owin.XML │ └── Microsoft.Owin.dll ├── Microsoft.Owin.Cors.3.1.0 ├── Microsoft.Owin.Cors.3.1.0.nupkg ├── Microsoft.Owin.Cors.3.1.0.nuspec └── lib │ └── net45 │ ├── Microsoft.Owin.Cors.XML │ └── Microsoft.Owin.Cors.dll ├── Microsoft.Owin.Host.SystemWeb.3.1.0 ├── Microsoft.Owin.Host.SystemWeb.3.1.0.nupkg ├── Microsoft.Owin.Host.SystemWeb.3.1.0.nuspec └── lib │ └── net45 │ ├── Microsoft.Owin.Host.SystemWeb.dll │ └── Microsoft.Owin.Host.SystemWeb.xml ├── Microsoft.Owin.Security.2.1.0 ├── Microsoft.Owin.Security.2.1.0.nupkg ├── Microsoft.Owin.Security.2.1.0.nuspec └── lib │ └── net45 │ ├── Microsoft.Owin.Security.XML │ └── Microsoft.Owin.Security.dll ├── Microsoft.Owin.Security.Cookies.2.1.0 ├── Microsoft.Owin.Security.Cookies.2.1.0.nupkg ├── Microsoft.Owin.Security.Cookies.2.1.0.nuspec └── lib │ └── net45 │ ├── Microsoft.Owin.Security.Cookies.dll │ └── Microsoft.Owin.Security.Cookies.xml ├── Microsoft.Owin.Security.OAuth.2.1.0 ├── Microsoft.Owin.Security.OAuth.2.1.0.nupkg ├── Microsoft.Owin.Security.OAuth.2.1.0.nuspec └── lib │ └── net45 │ ├── Microsoft.Owin.Security.OAuth.XML │ └── Microsoft.Owin.Security.OAuth.dll ├── Microsoft.Web.Infrastructure.1.0.0.0 ├── Microsoft.Web.Infrastructure.1.0.0.0.nupkg ├── Microsoft.Web.Infrastructure.1.0.0.0.nuspec └── lib │ └── net40 │ └── Microsoft.Web.Infrastructure.dll ├── Modernizr.2.6.2 ├── Content │ └── Scripts │ │ └── modernizr-2.6.2.js ├── Modernizr.2.6.2.nupkg ├── Modernizr.2.6.2.nuspec └── Tools │ ├── common.ps1 │ ├── install.ps1 │ └── uninstall.ps1 ├── Newtonsoft.Json.6.0.8 ├── Newtonsoft.Json.6.0.8.nupkg ├── Newtonsoft.Json.6.0.8.nuspec ├── lib │ ├── net20 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net35 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net40 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net45 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── netcore45 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── portable-net40+sl5+wp80+win8+wpa81 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ └── portable-net45+wp80+win8+wpa81+aspnetcore50 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml └── tools │ └── install.ps1 ├── Owin.1.0 ├── Owin.1.0.nupkg ├── Owin.1.0.nuspec └── lib │ └── net40 │ └── Owin.dll ├── Respond.1.2.0 ├── Respond.1.2.0.nupkg ├── Respond.1.2.0.nuspec └── content │ └── Scripts │ ├── respond.js │ └── respond.min.js ├── WebGrease.1.5.2 ├── WebGrease.1.5.2.nupkg ├── WebGrease.1.5.2.nuspec ├── lib │ └── WebGrease.dll └── tools │ └── WG.exe ├── bootstrap.3.0.0 ├── bootstrap.3.0.0.nupkg ├── bootstrap.3.0.0.nuspec └── content │ ├── Content │ ├── bootstrap.css │ └── bootstrap.min.css │ ├── Scripts │ ├── bootstrap.js │ └── bootstrap.min.js │ └── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── jQuery.1.10.2 ├── Content │ └── Scripts │ │ ├── jquery-1.10.2-vsdoc.js │ │ ├── jquery-1.10.2.js │ │ ├── jquery-1.10.2.min.js │ │ └── jquery-1.10.2.min.map ├── Tools │ ├── common.ps1 │ ├── install.ps1 │ ├── jquery-1.10.2.intellisense.js │ └── uninstall.ps1 ├── jQuery.1.10.2.nupkg └── jQuery.1.10.2.nuspec └── repositories.config /Angular5/.angular-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "project": { 4 | "name": "angular5" 5 | }, 6 | "apps": [ 7 | { 8 | "root": "src", 9 | "outDir": "dist", 10 | "assets": [ 11 | "assets", 12 | "favicon.ico" 13 | ], 14 | "index": "index.html", 15 | "main": "main.ts", 16 | "polyfills": "polyfills.ts", 17 | "test": "test.ts", 18 | "tsconfig": "tsconfig.app.json", 19 | "testTsconfig": "tsconfig.spec.json", 20 | "prefix": "app", 21 | "styles": [ 22 | "styles.css", 23 | "../node_modules/ngx-toastr/toastr.css" 24 | ], 25 | "scripts": [], 26 | "environmentSource": "environments/environment.ts", 27 | "environments": { 28 | "dev": "environments/environment.ts", 29 | "prod": "environments/environment.prod.ts" 30 | } 31 | } 32 | ], 33 | "e2e": { 34 | "protractor": { 35 | "config": "./protractor.conf.js" 36 | } 37 | }, 38 | "lint": [ 39 | { 40 | "project": "src/tsconfig.app.json", 41 | "exclude": "**/node_modules/**" 42 | }, 43 | { 44 | "project": "src/tsconfig.spec.json", 45 | "exclude": "**/node_modules/**" 46 | }, 47 | { 48 | "project": "e2e/tsconfig.e2e.json", 49 | "exclude": "**/node_modules/**" 50 | } 51 | ], 52 | "test": { 53 | "karma": { 54 | "config": "./karma.conf.js" 55 | } 56 | }, 57 | "defaults": { 58 | "styleExt": "css", 59 | "component": {} 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Angular5/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /Angular5/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | .c9/ 16 | *.launch 17 | .settings/ 18 | *.sublime-workspace 19 | 20 | # IDE - VSCode 21 | .vscode/* 22 | !.vscode/settings.json 23 | !.vscode/tasks.json 24 | !.vscode/launch.json 25 | !.vscode/extensions.json 26 | 27 | # misc 28 | /.sass-cache 29 | /connect.lock 30 | /coverage 31 | /libpeerconnection.log 32 | npm-debug.log 33 | testem.log 34 | /typings 35 | 36 | # e2e 37 | /e2e/*.js 38 | /e2e/*.map 39 | 40 | # System Files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /Angular5/README.md: -------------------------------------------------------------------------------- 1 | # Angular5 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.6.1. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /Angular5/e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('angular5 App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to app!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /Angular5/e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Angular5/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Angular5/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular/cli'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular/cli/plugins/karma') 14 | ], 15 | client:{ 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | reports: [ 'html', 'lcovonly' ], 20 | fixWebpackSourcePaths: true 21 | }, 22 | angularCli: { 23 | environment: 'dev' 24 | }, 25 | reporters: ['progress', 'kjhtml'], 26 | port: 9876, 27 | colors: true, 28 | logLevel: config.LOG_INFO, 29 | autoWatch: true, 30 | browsers: ['Chrome'], 31 | singleRun: false 32 | }); 33 | }; 34 | -------------------------------------------------------------------------------- /Angular5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular5", 3 | "version": "0.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "ng": "ng", 7 | "start": "ng serve", 8 | "build": "ng build --prod", 9 | "test": "ng test", 10 | "lint": "ng lint", 11 | "e2e": "ng e2e" 12 | }, 13 | "private": true, 14 | "dependencies": { 15 | "@angular/animations": "^5.0.0", 16 | "@angular/common": "^5.0.0", 17 | "@angular/compiler": "^5.0.0", 18 | "@angular/core": "^5.0.0", 19 | "@angular/forms": "^5.0.0", 20 | "@angular/http": "^5.0.0", 21 | "@angular/platform-browser": "^5.0.0", 22 | "@angular/platform-browser-dynamic": "^5.0.0", 23 | "@angular/router": "^5.0.0", 24 | "core-js": "^2.4.1", 25 | "ngx-toastr": "^8.1.1", 26 | "rxjs": "^5.5.2", 27 | "zone.js": "^0.8.14" 28 | }, 29 | "devDependencies": { 30 | "@angular/cli": "^1.6.6", 31 | "@angular/compiler-cli": "^5.0.0", 32 | "@angular/language-service": "^5.0.0", 33 | "@types/jasmine": "~2.5.53", 34 | "@types/jasminewd2": "~2.0.2", 35 | "@types/node": "~6.0.60", 36 | "codelyzer": "^4.0.1", 37 | "jasmine-core": "~2.6.2", 38 | "jasmine-spec-reporter": "~4.1.0", 39 | "karma": "~1.7.0", 40 | "karma-chrome-launcher": "~2.1.1", 41 | "karma-cli": "~1.0.1", 42 | "karma-coverage-istanbul-reporter": "^1.2.1", 43 | "karma-jasmine": "~1.1.0", 44 | "karma-jasmine-html-reporter": "^0.2.2", 45 | "protractor": "~5.1.2", 46 | "ts-node": "~3.2.0", 47 | "tslint": "~5.7.0", 48 | "typescript": "~2.4.2" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Angular5/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './e2e/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: 'e2e/tsconfig.e2e.json' 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /Angular5/src/app/admin-panel/admin-panel.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/app/admin-panel/admin-panel.component.css -------------------------------------------------------------------------------- /Angular5/src/app/admin-panel/admin-panel.component.html: -------------------------------------------------------------------------------- 1 |

2 | admin-panel works! 3 |

4 | -------------------------------------------------------------------------------- /Angular5/src/app/admin-panel/admin-panel.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AdminPanelComponent } from './admin-panel.component'; 4 | 5 | describe('AdminPanelComponent', () => { 6 | let component: AdminPanelComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AdminPanelComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AdminPanelComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /Angular5/src/app/admin-panel/admin-panel.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-admin-panel', 5 | templateUrl: './admin-panel.component.html', 6 | styleUrls: ['./admin-panel.component.css'] 7 | }) 8 | export class AdminPanelComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Angular5/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/app/app.component.css -------------------------------------------------------------------------------- /Angular5/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular5/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | describe('AppComponent', () => { 4 | beforeEach(async(() => { 5 | TestBed.configureTestingModule({ 6 | declarations: [ 7 | AppComponent 8 | ], 9 | }).compileComponents(); 10 | })); 11 | it('should create the app', async(() => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.debugElement.componentInstance; 14 | expect(app).toBeTruthy(); 15 | })); 16 | it(`should have as title 'app'`, async(() => { 17 | const fixture = TestBed.createComponent(AppComponent); 18 | const app = fixture.debugElement.componentInstance; 19 | expect(app.title).toEqual('app'); 20 | })); 21 | it('should render title in a h1 tag', async(() => { 22 | const fixture = TestBed.createComponent(AppComponent); 23 | fixture.detectChanges(); 24 | const compiled = fixture.debugElement.nativeElement; 25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); 26 | })); 27 | }); 28 | -------------------------------------------------------------------------------- /Angular5/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /Angular5/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule} from '@angular/forms'; 4 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 5 | import { RouterModule } from '@angular/router' 6 | 7 | import { AppComponent } from './app.component'; 8 | import { UserService } from './shared/user.service'; 9 | import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; 10 | import { ToastrModule } from 'ngx-toastr'; 11 | import { UserComponent } from './user/user.component'; 12 | import { SignInComponent } from './user/sign-in/sign-in.component'; 13 | import { HomeComponent } from './home/home.component'; 14 | import { SignUpComponent } from './user/sign-up/sign-up.component'; 15 | import { appRoutes } from './routes'; 16 | import { AuthGuard } from './auth/auth.guard'; 17 | import { AuthInterceptor } from './auth/auth.interceptor'; 18 | import { AdminPanelComponent } from './admin-panel/admin-panel.component'; 19 | import { ForbiddenComponent } from './forbidden/forbidden.component'; 20 | 21 | 22 | @NgModule({ 23 | declarations: [ 24 | AppComponent, 25 | SignUpComponent, 26 | UserComponent, 27 | SignInComponent, 28 | HomeComponent, 29 | AdminPanelComponent, 30 | ForbiddenComponent 31 | ], 32 | imports: [ 33 | BrowserModule, 34 | FormsModule, 35 | HttpClientModule, 36 | ToastrModule.forRoot(), 37 | BrowserAnimationsModule, 38 | RouterModule.forRoot(appRoutes) 39 | ], 40 | providers: [UserService,AuthGuard, 41 | , 42 | { 43 | provide : HTTP_INTERCEPTORS, 44 | useClass : AuthInterceptor, 45 | multi : true 46 | }], 47 | bootstrap: [AppComponent] 48 | }) 49 | export class AppModule { } 50 | -------------------------------------------------------------------------------- /Angular5/src/app/auth/auth.guard.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async, inject } from '@angular/core/testing'; 2 | 3 | import { AuthGuard } from './auth.guard'; 4 | 5 | describe('AuthGuard', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [AuthGuard] 9 | }); 10 | }); 11 | 12 | it('should ...', inject([AuthGuard], (guard: AuthGuard) => { 13 | expect(guard).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /Angular5/src/app/auth/auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router'; 3 | import { Observable } from 'rxjs/Observable'; 4 | import { UserService } from '../shared/user.service'; 5 | 6 | @Injectable() 7 | export class AuthGuard implements CanActivate { 8 | constructor(private router : Router,private userService : UserService){} 9 | canActivate( 10 | next: ActivatedRouteSnapshot, 11 | state: RouterStateSnapshot): boolean { 12 | if (localStorage.getItem('userToken') != null) 13 | { 14 | let roles = next.data["roles"] as Array; 15 | if (roles) { 16 | var match = this.userService.roleMatch(roles); 17 | if (match) return true; 18 | else { 19 | this.router.navigate(['/forbidden']); 20 | return false; 21 | } 22 | } 23 | else 24 | return true; 25 | } 26 | this.router.navigate(['/login']); 27 | return false; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Angular5/src/app/auth/auth.interceptor.ts: -------------------------------------------------------------------------------- 1 | import { HttpInterceptor, HttpRequest, HttpHandler, HttpUserEvent, HttpEvent } from "@angular/common/http"; 2 | import { Observable } from "rxjs/Observable"; 3 | import { UserService } from "../shared/user.service"; 4 | import 'rxjs/add/operator/do'; 5 | import { Injectable } from "@angular/core"; 6 | import { Router } from "@angular/router"; 7 | 8 | @Injectable() 9 | export class AuthInterceptor implements HttpInterceptor { 10 | 11 | constructor(private router: Router) { } 12 | 13 | intercept(req: HttpRequest, next: HttpHandler): Observable> { 14 | if (req.headers.get('No-Auth') == "True") 15 | return next.handle(req.clone()); 16 | 17 | if (localStorage.getItem('userToken') != null) { 18 | const clonedreq = req.clone({ 19 | headers: req.headers.set("Authorization", "Bearer " + localStorage.getItem('userToken')) 20 | }); 21 | return next.handle(clonedreq) 22 | .do( 23 | succ => { }, 24 | err => { 25 | if (err.status === 401) 26 | this.router.navigateByUrl('/login'); 27 | else (err.status === 403) 28 | this.router.navigateByUrl('/forbidden'); 29 | } 30 | ); 31 | } 32 | else { 33 | this.router.navigateByUrl('/login'); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Angular5/src/app/forbidden/forbidden.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/app/forbidden/forbidden.component.css -------------------------------------------------------------------------------- /Angular5/src/app/forbidden/forbidden.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 | 7 |
8 |
9 | 403 - ACCESS DENIED 10 |

You don't have the permission to access this resource.

11 |
12 |
13 |
14 |
-------------------------------------------------------------------------------- /Angular5/src/app/forbidden/forbidden.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { ForbiddenComponent } from './forbidden.component'; 4 | 5 | describe('ForbiddenComponent', () => { 6 | let component: ForbiddenComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ ForbiddenComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(ForbiddenComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /Angular5/src/app/forbidden/forbidden.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-forbidden', 5 | templateUrl: './forbidden.component.html', 6 | styleUrls: ['./forbidden.component.css'] 7 | }) 8 | export class ForbiddenComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Angular5/src/app/home/home.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/app/home/home.component.css -------------------------------------------------------------------------------- /Angular5/src/app/home/home.component.html: -------------------------------------------------------------------------------- 1 | 15 |
16 |
17 |
18 |
19 | Username :{{userClaims.UserName}} 20 |
21 | Email : {{userClaims.Email}} 22 |
23 | Full Name : {{userClaims.FirstName}} {{userClaims.LastName}} 24 |
25 | Logged On : {{userClaims.LoggedOn}} 26 |
27 |
28 |
29 |
-------------------------------------------------------------------------------- /Angular5/src/app/home/home.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HomeComponent } from './home.component'; 4 | 5 | describe('HomeComponent', () => { 6 | let component: HomeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ HomeComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HomeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /Angular5/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Router } from '@angular/router'; 3 | import { UserService } from '../shared/user.service'; 4 | 5 | @Component({ 6 | selector: 'app-home', 7 | templateUrl: './home.component.html', 8 | styleUrls: ['./home.component.css'] 9 | }) 10 | export class HomeComponent implements OnInit { 11 | userClaims: any; 12 | 13 | constructor(private router: Router, private userService: UserService) { } 14 | 15 | ngOnInit() { 16 | this.userService.getUserClaims().subscribe((data: any) => { 17 | this.userClaims = data; 18 | 19 | }); 20 | 21 | if(this.userService.roleMatch(['Author'])) 22 | { 23 | //do the operation 24 | } 25 | } 26 | 27 | Logout() { 28 | localStorage.removeItem('userToken'); 29 | this.router.navigate(['/login']); 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Angular5/src/app/routes.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router' 2 | import { HomeComponent } from './home/home.component'; 3 | import { UserComponent } from './user/user.component'; 4 | import { SignUpComponent } from './user/sign-up/sign-up.component'; 5 | import { SignInComponent } from './user/sign-in/sign-in.component'; 6 | import { AuthGuard } from './auth/auth.guard'; 7 | import { AdminPanelComponent } from './admin-panel/admin-panel.component'; 8 | import { ForbiddenComponent } from './forbidden/forbidden.component'; 9 | 10 | export const appRoutes: Routes = [ 11 | { path: 'home', component: HomeComponent,canActivate:[AuthGuard] }, 12 | { path: 'forbidden', component: ForbiddenComponent, canActivate: [AuthGuard] }, 13 | { path: 'adminPanel', component: AdminPanelComponent, canActivate: [AuthGuard] , data: { roles: ['Admin'] }}, 14 | { 15 | path: 'signup', component: UserComponent, 16 | children: [{ path: '', component: SignUpComponent }] 17 | }, 18 | { 19 | path: 'login', component: UserComponent, 20 | children: [{ path: '', component: SignInComponent }] 21 | }, 22 | { path : '', redirectTo:'/login', pathMatch : 'full'} 23 | 24 | ]; -------------------------------------------------------------------------------- /Angular5/src/app/shared/user.model.ts: -------------------------------------------------------------------------------- 1 | export class User { 2 | UserName: string; 3 | Password: string; 4 | Email: string; 5 | FirstName: string; 6 | LastName: string; 7 | } 8 | -------------------------------------------------------------------------------- /Angular5/src/app/shared/user.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject } from '@angular/core/testing'; 2 | 3 | import { UserService } from './user.service'; 4 | 5 | describe('UserService', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [UserService] 9 | }); 10 | }); 11 | 12 | it('should be created', inject([UserService], (service: UserService) => { 13 | expect(service).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /Angular5/src/app/shared/user.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { HttpClient, HttpHeaders } from '@angular/common/http'; 3 | import { Response } from "@angular/http"; 4 | import { Observable } from 'rxjs'; 5 | import 'rxjs/add/operator/map'; 6 | import { User } from './user.model'; 7 | 8 | @Injectable() 9 | export class UserService { 10 | readonly rootUrl = 'http://localhost:35257'; 11 | constructor(private http: HttpClient) { } 12 | 13 | registerUser(user: User,roles : string[]) { 14 | const body = { 15 | UserName: user.UserName, 16 | Password: user.Password, 17 | Email: user.Email, 18 | FirstName: user.FirstName, 19 | LastName: user.LastName, 20 | Roles : roles 21 | } 22 | var reqHeader = new HttpHeaders({'No-Auth':'True'}); 23 | return this.http.post(this.rootUrl + '/api/User/Register', body,{headers : reqHeader}); 24 | } 25 | 26 | userAuthentication(userName, password) { 27 | var data = "username=" + userName + "&password=" + password + "&grant_type=password"; 28 | var reqHeader = new HttpHeaders({ 'Content-Type': 'application/x-www-urlencoded','No-Auth':'True' }); 29 | return this.http.post(this.rootUrl + '/token', data, { headers: reqHeader }); 30 | } 31 | 32 | getUserClaims(){ 33 | return this.http.get(this.rootUrl+'/api/GetUserClaims'); 34 | } 35 | 36 | getAllRoles() { 37 | var reqHeader = new HttpHeaders({ 'No-Auth': 'True' }); 38 | return this.http.get(this.rootUrl + '/api/GetAllRoles', { headers: reqHeader }); 39 | } 40 | 41 | roleMatch(allowedRoles): boolean { 42 | var isMatch = false; 43 | var userRoles: string[] = JSON.parse(localStorage.getItem('userRoles')); 44 | allowedRoles.forEach(element => { 45 | if (userRoles.indexOf(element) > -1) { 46 | isMatch = true; 47 | return false; 48 | } 49 | }); 50 | return isMatch; 51 | 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /Angular5/src/app/user/sign-in/sign-in.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/app/user/sign-in/sign-in.component.css -------------------------------------------------------------------------------- /Angular5/src/app/user/sign-in/sign-in.component.html: -------------------------------------------------------------------------------- 1 |
2 | error Incorrect username or password 3 |
4 |
5 |
6 |
7 | account_circle 8 | 9 |
10 |
11 |
12 |
13 | vpn_key 14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
-------------------------------------------------------------------------------- /Angular5/src/app/user/sign-in/sign-in.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SignInComponent } from './sign-in.component'; 4 | 5 | describe('SignInComponent', () => { 6 | let component: SignInComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SignInComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SignInComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /Angular5/src/app/user/sign-in/sign-in.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { UserService } from '../../shared/user.service'; 3 | import { HttpErrorResponse } from '@angular/common/http'; 4 | import { Router } from '@angular/router'; 5 | 6 | @Component({ 7 | selector: 'app-sign-in', 8 | templateUrl: './sign-in.component.html', 9 | styleUrls: ['./sign-in.component.css'] 10 | }) 11 | export class SignInComponent implements OnInit { 12 | isLoginError : boolean = false; 13 | constructor(private userService : UserService,private router : Router) { } 14 | 15 | ngOnInit() { 16 | } 17 | 18 | OnSubmit(userName,password){ 19 | this.userService.userAuthentication(userName,password).subscribe((data : any)=>{ 20 | localStorage.setItem('userToken',data.access_token); 21 | localStorage.setItem('userRoles',data.role); 22 | this.router.navigate(['/home']); 23 | }, 24 | (err : HttpErrorResponse)=>{ 25 | this.isLoginError = true; 26 | }); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Angular5/src/app/user/sign-up/sign-up.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/app/user/sign-up/sign-up.component.css -------------------------------------------------------------------------------- /Angular5/src/app/user/sign-up/sign-up.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 |
7 |
8 | 9 | 10 |
11 |
12 |
13 |
14 | 15 | 16 |
17 |
18 |
19 |
20 | 21 | 22 |
23 |
24 | 25 | 26 |
27 |
28 |
29 |
    30 |
  • 31 | 32 | 33 |
  • 34 |
35 |
36 |
37 |
38 | 39 |
40 |
41 |
-------------------------------------------------------------------------------- /Angular5/src/app/user/sign-up/sign-up.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { SignUpComponent } from './sign-up.component'; 4 | 5 | describe('SignUpComponent', () => { 6 | let component: SignUpComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ SignUpComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(SignUpComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /Angular5/src/app/user/sign-up/sign-up.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { NgForm } from '@angular/forms'; 3 | import { ToastrService } from 'ngx-toastr' 4 | import { User } from '../../shared/user.model'; 5 | import { UserService } from '../../shared/user.service'; 6 | 7 | @Component({ 8 | selector: 'app-sign-up', 9 | templateUrl: './sign-up.component.html', 10 | styleUrls: ['./sign-up.component.css'] 11 | }) 12 | export class SignUpComponent implements OnInit { 13 | user: User; 14 | emailPattern = "^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"; 15 | roles : any[]; 16 | 17 | constructor(private userService: UserService, private toastr: ToastrService) { } 18 | 19 | ngOnInit() { 20 | this.resetForm(); 21 | this.userService.getAllRoles().subscribe( 22 | (data : any)=>{ 23 | data.forEach(obj => obj.selected = false); 24 | this.roles = data; 25 | } 26 | ); 27 | } 28 | 29 | resetForm(form?: NgForm) { 30 | if (form != null) 31 | form.reset(); 32 | this.user = { 33 | UserName: '', 34 | Password: '', 35 | Email: '', 36 | FirstName: '', 37 | LastName: '' 38 | } 39 | if (this.roles) 40 | this.roles.map(x => x.selected = false); 41 | } 42 | 43 | OnSubmit(form: NgForm) { 44 | var x = this.roles.filter(x => x.selected).map(y => y.Name); 45 | this.userService.registerUser(form.value,x) 46 | .subscribe((data: any) => { 47 | if (data.Succeeded == true) { 48 | this.resetForm(form); 49 | this.toastr.success('User registration successful'); 50 | } 51 | else 52 | this.toastr.error(data.Errors[0]); 53 | }); 54 | } 55 | 56 | updateSelectedRoles(index) { 57 | this.roles[index].selected = !this.roles[index].selected; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /Angular5/src/app/user/user.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/app/user/user.component.css -------------------------------------------------------------------------------- /Angular5/src/app/user/user.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | 14 |
15 |
16 |
17 | 18 |
19 |
20 |
21 |
22 |
23 |
-------------------------------------------------------------------------------- /Angular5/src/app/user/user.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { UserComponent } from './user.component'; 4 | 5 | describe('UserComponent', () => { 6 | let component: UserComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ UserComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(UserComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /Angular5/src/app/user/user.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-user', 5 | templateUrl: './user.component.html', 6 | styleUrls: ['./user.component.css'] 7 | }) 8 | export class UserComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Angular5/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/assets/.gitkeep -------------------------------------------------------------------------------- /Angular5/src/assets/img/403.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/assets/img/403.png -------------------------------------------------------------------------------- /Angular5/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Angular5/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /Angular5/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/Angular5/src/favicon.ico -------------------------------------------------------------------------------- /Angular5/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Angular5 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Angular5/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /Angular5/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | button.btn-submit{ 3 | background-color: #38547b; 4 | color: #fff; 5 | width: 100%; 6 | } 7 | button.btn-submit:focus,button.btn-submit:hover{ 8 | background-color: #38547b; 9 | } 10 | 11 | input.ng-invalid.ng-dirty{ 12 | border-bottom-color : #e91e63 !important; 13 | box-shadow: 0 1px 0 0 #e91e63 !important; 14 | } 15 | /*for error div i*/ 16 | div.error-message i{ 17 | vertical-align: middle !important; 18 | } 19 | 20 | /*for tab control*/ 21 | .tabs{ 22 | height: 65px; 23 | } 24 | .tabs .tab{ 25 | text-transform : none !important; 26 | line-height: 65px; 27 | height: 65px; 28 | } 29 | .tabs .tab a{ 30 | font-size: 25px; 31 | color: grey !important; 32 | } 33 | 34 | .tabs .tab a.active{ 35 | background-color: #fff !important; 36 | } 37 | -------------------------------------------------------------------------------- /Angular5/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/long-stack-trace-zone'; 4 | import 'zone.js/dist/proxy.js'; 5 | import 'zone.js/dist/sync-test'; 6 | import 'zone.js/dist/jasmine-patch'; 7 | import 'zone.js/dist/async-test'; 8 | import 'zone.js/dist/fake-async-test'; 9 | import { getTestBed } from '@angular/core/testing'; 10 | import { 11 | BrowserDynamicTestingModule, 12 | platformBrowserDynamicTesting 13 | } from '@angular/platform-browser-dynamic/testing'; 14 | 15 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. 16 | declare const __karma__: any; 17 | declare const require: any; 18 | 19 | // Prevent Karma from running prematurely. 20 | __karma__.loaded = function () {}; 21 | 22 | // First, initialize the Angular testing environment. 23 | getTestBed().initTestEnvironment( 24 | BrowserDynamicTestingModule, 25 | platformBrowserDynamicTesting() 26 | ); 27 | // Then we find all the tests. 28 | const context = require.context('./', true, /\.spec\.ts$/); 29 | // And load the modules. 30 | context.keys().map(context); 31 | // Finally, start Karma to run the tests. 32 | __karma__.start(); 33 | -------------------------------------------------------------------------------- /Angular5/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Angular5/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "node" 11 | ] 12 | }, 13 | "files": [ 14 | "test.ts" 15 | ], 16 | "include": [ 17 | "**/*.spec.ts", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /Angular5/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /Angular5/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WebAPI/WebAPI.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAPI", "WebAPI\WebAPI.csproj", "{BD9CA078-5CB5-4C22-8CF7-0B36D4C51311}" 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 | {BD9CA078-5CB5-4C22-8CF7-0B36D4C51311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {BD9CA078-5CB5-4C22-8CF7-0B36D4C51311}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {BD9CA078-5CB5-4C22-8CF7-0B36D4C51311}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {BD9CA078-5CB5-4C22-8CF7-0B36D4C51311}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /WebAPI/WebAPI.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI.v12.suo -------------------------------------------------------------------------------- /WebAPI/WebAPI/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace WebAPI 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/Scripts/jquery-{version}.js")); 13 | 14 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 15 | // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. 16 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 17 | "~/Scripts/modernizr-*")); 18 | 19 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 20 | "~/Scripts/bootstrap.js", 21 | "~/Scripts/respond.js")); 22 | 23 | bundles.Add(new StyleBundle("~/Content/css").Include( 24 | "~/Content/bootstrap.css", 25 | "~/Content/site.css")); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace WebAPI 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace WebAPI 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Http; 5 | using System.Web.Http.Cors; 6 | 7 | namespace WebAPI 8 | { 9 | public static class WebApiConfig 10 | { 11 | public static void Register(HttpConfiguration config) 12 | { 13 | // Web API configuration and services 14 | //config.EnableCors(new EnableCorsAttribute("http://localhost:4200", headers: "*", methods: "*")); 15 | 16 | // Web API routes 17 | config.MapHttpAttributeRoutes(); 18 | 19 | config.Routes.MapHttpRoute( 20 | name: "DefaultApi", 21 | routeTemplate: "api/{controller}/{id}", 22 | defaults: new { id = RouteParameter.Optional } 23 | ); 24 | 25 | config.Filters.Add(new AuthorizeAttribute()); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/ApiDescriptionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Web; 4 | using System.Web.Http.Description; 5 | 6 | namespace WebAPI.Areas.HelpPage 7 | { 8 | public static class ApiDescriptionExtensions 9 | { 10 | /// 11 | /// Generates an URI-friendly ID for the . E.g. "Get-Values-id_name" instead of "GetValues/{id}?name={name}" 12 | /// 13 | /// The . 14 | /// The ID as a string. 15 | public static string GetFriendlyId(this ApiDescription description) 16 | { 17 | string path = description.RelativePath; 18 | string[] urlParts = path.Split('?'); 19 | string localPath = urlParts[0]; 20 | string queryKeyString = null; 21 | if (urlParts.Length > 1) 22 | { 23 | string query = urlParts[1]; 24 | string[] queryKeys = HttpUtility.ParseQueryString(query).AllKeys; 25 | queryKeyString = String.Join("_", queryKeys); 26 | } 27 | 28 | StringBuilder friendlyPath = new StringBuilder(); 29 | friendlyPath.AppendFormat("{0}-{1}", 30 | description.HttpMethod.Method, 31 | localPath.Replace("/", "-").Replace("{", String.Empty).Replace("}", String.Empty)); 32 | if (queryKeyString != null) 33 | { 34 | friendlyPath.AppendFormat("_{0}", queryKeyString); 35 | } 36 | return friendlyPath.ToString(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Controllers/HelpController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Http; 3 | using System.Web.Mvc; 4 | using WebAPI.Areas.HelpPage.Models; 5 | 6 | namespace WebAPI.Areas.HelpPage.Controllers 7 | { 8 | /// 9 | /// The controller that will handle requests for the help page. 10 | /// 11 | public class HelpController : Controller 12 | { 13 | public HelpController() 14 | : this(GlobalConfiguration.Configuration) 15 | { 16 | } 17 | 18 | public HelpController(HttpConfiguration config) 19 | { 20 | Configuration = config; 21 | } 22 | 23 | public HttpConfiguration Configuration { get; private set; } 24 | 25 | public ActionResult Index() 26 | { 27 | ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider(); 28 | return View(Configuration.Services.GetApiExplorer().ApiDescriptions); 29 | } 30 | 31 | public ActionResult Api(string apiId) 32 | { 33 | if (!String.IsNullOrEmpty(apiId)) 34 | { 35 | HelpPageApiModel apiModel = Configuration.GetHelpPageApiModel(apiId); 36 | if (apiModel != null) 37 | { 38 | return View(apiModel); 39 | } 40 | } 41 | 42 | return View("Error"); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/HelpPage.css: -------------------------------------------------------------------------------- 1 | pre.wrapped { 2 | white-space: -moz-pre-wrap; 3 | white-space: -pre-wrap; 4 | white-space: -o-pre-wrap; 5 | white-space: pre-wrap; 6 | } 7 | 8 | .warning-message-container { 9 | margin-top: 20px; 10 | padding: 0 10px; 11 | color: #525252; 12 | background: #EFDCA9; 13 | border: 1px solid #CCCCCC; 14 | } 15 | 16 | .help-page-table { 17 | width: 100%; 18 | border-collapse: collapse; 19 | text-align: left; 20 | margin: 0px 0px 20px 0px; 21 | border-top: 2px solid #D4D4D4; 22 | } 23 | 24 | .help-page-table th { 25 | text-align: left; 26 | font-weight: bold; 27 | border-bottom: 2px solid #D4D4D4; 28 | padding: 8px 6px 8px 6px; 29 | } 30 | 31 | .help-page-table td { 32 | border-bottom: 2px solid #D4D4D4; 33 | padding: 15px 8px 15px 8px; 34 | vertical-align: top; 35 | } 36 | 37 | .help-page-table pre, .help-page-table p { 38 | margin: 0px; 39 | padding: 0px; 40 | font-family: inherit; 41 | font-size: 100%; 42 | } 43 | 44 | .help-page-table tbody tr:hover td { 45 | background-color: #F3F3F3; 46 | } 47 | 48 | a:hover { 49 | background-color: transparent; 50 | } 51 | 52 | .sample-header { 53 | border: 2px solid #D4D4D4; 54 | background: #76B8DB; 55 | color: #FFFFFF; 56 | padding: 8px 15px; 57 | border-bottom: none; 58 | display: inline-block; 59 | margin: 10px 0px 0px 0px; 60 | } 61 | 62 | .sample-content { 63 | display: block; 64 | border-width: 0; 65 | padding: 15px 20px; 66 | background: #FFFFFF; 67 | border: 2px solid #D4D4D4; 68 | margin: 0px 0px 10px 0px; 69 | } 70 | 71 | .api-name { 72 | width: 40%; 73 | } 74 | 75 | .api-documentation { 76 | width: 60%; 77 | } 78 | 79 | .parameter-name { 80 | width: 20%; 81 | } 82 | 83 | .parameter-documentation { 84 | width: 50%; 85 | } 86 | 87 | .parameter-source { 88 | width: 30%; 89 | } 90 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/HelpPageAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | 4 | namespace WebAPI.Areas.HelpPage 5 | { 6 | public class HelpPageAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "HelpPage"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRoute( 19 | "HelpPage_Default", 20 | "Help/{action}/{apiId}", 21 | new { controller = "Help", action = "Index", apiId = UrlParameter.Optional }); 22 | 23 | HelpPageConfig.Register(GlobalConfiguration.Configuration); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Models/HelpPageApiModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using System.Net.Http.Headers; 4 | using System.Web.Http.Description; 5 | 6 | namespace WebAPI.Areas.HelpPage.Models 7 | { 8 | /// 9 | /// The model that represents an API displayed on the help page. 10 | /// 11 | public class HelpPageApiModel 12 | { 13 | /// 14 | /// Initializes a new instance of the class. 15 | /// 16 | public HelpPageApiModel() 17 | { 18 | SampleRequests = new Dictionary(); 19 | SampleResponses = new Dictionary(); 20 | ErrorMessages = new Collection(); 21 | } 22 | 23 | /// 24 | /// Gets or sets the that describes the API. 25 | /// 26 | public ApiDescription ApiDescription { get; set; } 27 | 28 | /// 29 | /// Gets the sample requests associated with the API. 30 | /// 31 | public IDictionary SampleRequests { get; private set; } 32 | 33 | /// 34 | /// Gets the sample responses associated with the API. 35 | /// 36 | public IDictionary SampleResponses { get; private set; } 37 | 38 | /// 39 | /// Gets the error messages associated with this model. 40 | /// 41 | public Collection ErrorMessages { get; private set; } 42 | } 43 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/SampleGeneration/ImageSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebAPI.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class. 7 | /// 8 | public class ImageSample 9 | { 10 | /// 11 | /// Initializes a new instance of the class. 12 | /// 13 | /// The URL of an image. 14 | public ImageSample(string src) 15 | { 16 | if (src == null) 17 | { 18 | throw new ArgumentNullException("src"); 19 | } 20 | Src = src; 21 | } 22 | 23 | public string Src { get; private set; } 24 | 25 | public override bool Equals(object obj) 26 | { 27 | ImageSample other = obj as ImageSample; 28 | return other != null && Src == other.Src; 29 | } 30 | 31 | public override int GetHashCode() 32 | { 33 | return Src.GetHashCode(); 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return Src; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/SampleGeneration/InvalidSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebAPI.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. 7 | /// 8 | public class InvalidSample 9 | { 10 | public InvalidSample(string errorMessage) 11 | { 12 | if (errorMessage == null) 13 | { 14 | throw new ArgumentNullException("errorMessage"); 15 | } 16 | ErrorMessage = errorMessage; 17 | } 18 | 19 | public string ErrorMessage { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | InvalidSample other = obj as InvalidSample; 24 | return other != null && ErrorMessage == other.ErrorMessage; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return ErrorMessage.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return ErrorMessage; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/SampleGeneration/SampleDirection.cs: -------------------------------------------------------------------------------- 1 | namespace WebAPI.Areas.HelpPage 2 | { 3 | /// 4 | /// Indicates whether the sample is used for request or response 5 | /// 6 | public enum SampleDirection 7 | { 8 | Request = 0, 9 | Response 10 | } 11 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/SampleGeneration/TextSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebAPI.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class. 7 | /// 8 | public class TextSample 9 | { 10 | public TextSample(string text) 11 | { 12 | if (text == null) 13 | { 14 | throw new ArgumentNullException("text"); 15 | } 16 | Text = text; 17 | } 18 | 19 | public string Text { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | TextSample other = obj as TextSample; 24 | return other != null && Text == other.Text; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return Text.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Text; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/Api.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using WebAPI.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | ViewBag.Title = description.HttpMethod.Method + " " + description.RelativePath; 8 | } 9 | 10 |
11 | 18 |
19 | @Html.DisplayFor(m => Model) 20 |
21 |
22 | 23 | @section Scripts { 24 | 25 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using WebAPI.Areas.HelpPage 5 | @using WebAPI.Areas.HelpPage.Models 6 | @model IGrouping 7 | 8 | @{ 9 | var controllerDocumentation = ViewBag.DocumentationProvider != null ? 10 | ViewBag.DocumentationProvider.GetDocumentation(Model.Key) : 11 | null; 12 | } 13 | 14 |

@Model.Key.ControllerName

15 | @if (!String.IsNullOrEmpty(controllerDocumentation)) 16 | { 17 |

@controllerDocumentation

18 | } 19 | 20 | 21 | 22 | 23 | 24 | @foreach (var api in Model) 25 | { 26 | 27 | 28 | 38 | 39 | } 40 | 41 |
APIDescription
@api.HttpMethod.Method @api.RelativePath 29 | @if (api.Documentation != null) 30 | { 31 |

@api.Documentation

32 | } 33 | else 34 | { 35 |

No documentation available.

36 | } 37 |
-------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using WebAPI.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | bool hasParameters = description.ParameterDescriptions.Count > 0; 8 | bool hasRequestSamples = Model.SampleRequests.Count > 0; 9 | bool hasResponseSamples = Model.SampleResponses.Count > 0; 10 | } 11 |

@description.HttpMethod.Method @description.RelativePath

12 |
13 | @if (description.Documentation != null) 14 | { 15 |

@description.Documentation

16 | } 17 | else 18 | { 19 |

No documentation available.

20 | } 21 | 22 | @if (hasParameters || hasRequestSamples) 23 | { 24 |

Request Information

25 | if (hasParameters) 26 | { 27 |

Parameters

28 | @Html.DisplayFor(apiModel => apiModel.ApiDescription.ParameterDescriptions, "Parameters") 29 | } 30 | if (hasRequestSamples) 31 | { 32 |

Request body formats

33 | @Html.DisplayFor(apiModel => apiModel.SampleRequests, "Samples") 34 | } 35 | } 36 | 37 | @if (hasResponseSamples) 38 | { 39 |

Response Information

40 | if (description.ResponseDescription.Documentation != null) 41 | { 42 |

@description.ResponseDescription.Documentation

43 | } 44 | else 45 | { 46 |

No documentation available.

47 | } 48 |

Response body formats

49 | @Html.DisplayFor(apiModel => apiModel.SampleResponses, "Samples") 50 | } 51 |
-------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml: -------------------------------------------------------------------------------- 1 | @using WebAPI.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml: -------------------------------------------------------------------------------- 1 | @using WebAPI.Areas.HelpPage 2 | @model InvalidSample 3 | 4 | @if (HttpContext.Current.IsDebuggingEnabled) 5 | { 6 |
7 |

@Model.ErrorMessage

8 |
9 | } 10 | else 11 | { 12 |

Sample not available.

13 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Collections.ObjectModel 2 | @using System.Web.Http.Description 3 | @using System.Threading 4 | @model Collection 5 | 6 | 7 | 8 | 9 | 10 | 11 | @foreach (ApiParameterDescription parameter in Model) 12 | { 13 | string parameterDocumentation = parameter.Documentation != null ? 14 | parameter.Documentation : 15 | "No documentation available."; 16 | 17 | // Don't show CancellationToken because it's a special parameter 18 | if (parameter.ParameterDescriptor == null || 19 | (parameter.ParameterDescriptor != null && 20 | !typeof(CancellationToken).IsAssignableFrom(parameter.ParameterDescriptor.ParameterType))) 21 | { 22 | 23 | 24 | 25 | 40 | 41 | } 42 | } 43 | 44 |
NameDescriptionAdditional information
@parameter.Name
@parameterDocumentation
26 | @switch (parameter.Source) 27 | { 28 | case ApiParameterSource.FromBody: 29 |

Define this parameter in the request body.

30 | break; 31 | case ApiParameterSource.FromUri: 32 |

Define this parameter in the request URI.

33 | break; 34 | case ApiParameterSource.Unknown: 35 | default: 36 |

None.

37 | break; 38 | } 39 |
-------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Net.Http.Headers 2 | @model Dictionary 3 | 4 | @{ 5 | // Group the samples into a single tab if they are the same. 6 | Dictionary samples = Model.GroupBy(pair => pair.Value).ToDictionary( 7 | pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()), 8 | pair => pair.Key); 9 | var mediaTypes = samples.Keys; 10 | } 11 |
12 | @foreach (var mediaType in mediaTypes) 13 | { 14 |

@mediaType

15 |
16 | Sample: 17 | @{ 18 | var sample = samples[mediaType]; 19 | if (sample == null) 20 | { 21 |

Sample not available.

22 | } 23 | else 24 | { 25 | @Html.DisplayFor(s => sample); 26 | } 27 | } 28 |
29 | } 30 |
-------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml: -------------------------------------------------------------------------------- 1 | @using WebAPI.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using System.Collections.ObjectModel 5 | @using WebAPI.Areas.HelpPage.Models 6 | @model Collection 7 | 8 | @{ 9 | ViewBag.Title = "ASP.NET Web API Help Page"; 10 | 11 | // Group APIs by controller 12 | ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor); 13 | } 14 | 15 |
16 |
17 |
18 |

@ViewBag.Title

19 |
20 |
21 |
22 |
23 | 31 |
32 | @foreach (var group in apiGroups) 33 | { 34 | @Html.DisplayFor(m => group, "ApiGroup") 35 | } 36 |
37 |
38 | 39 | @section Scripts { 40 | 41 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages 3 | Layout = "~/Views/Shared/_Layout.cshtml"; 4 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/AuthorizeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace WebAPI 7 | { 8 | public class AuthorizeAttribute : System.Web.Http.AuthorizeAttribute 9 | { 10 | protected override void HandleUnauthorizedRequest(System.Web.Http.Controllers.HttpActionContext actionContext) 11 | { 12 | if (!HttpContext.Current.User.Identity.IsAuthenticated) 13 | { 14 | base.HandleUnauthorizedRequest(actionContext); 15 | } 16 | else 17 | { 18 | actionContext.Response = new System.Net.Http.HttpResponseMessage(System.Net.HttpStatusCode.Forbidden); 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | 19 | /* styles for validation helpers */ 20 | .field-validation-error { 21 | color: #b94a48; 22 | } 23 | 24 | .field-validation-valid { 25 | display: none; 26 | } 27 | 28 | input.input-validation-error { 29 | border: 1px solid #b94a48; 30 | } 31 | 32 | input[type="checkbox"].input-validation-error { 33 | border: 0 none; 34 | } 35 | 36 | .validation-summary-errors { 37 | color: #b94a48; 38 | } 39 | 40 | .validation-summary-valid { 41 | display: none; 42 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace WebAPI.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | ViewBag.Title = "Home Page"; 14 | 15 | return View(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Controllers/RoleController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity; 2 | using Microsoft.AspNet.Identity.EntityFramework; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Net; 7 | using System.Net.Http; 8 | using System.Web.Http; 9 | using WebAPI.Models; 10 | 11 | namespace WebAPI.Controllers 12 | { 13 | public class RoleController : ApiController 14 | { 15 | 16 | [HttpGet] 17 | [Route("api/GetAllRoles")] 18 | [AllowAnonymous] 19 | public HttpResponseMessage GetRoles() 20 | { 21 | var roleStore = new RoleStore(new ApplicationDbContext()); 22 | var roleMngr = new RoleManager(roleStore); 23 | 24 | var roles = roleMngr.Roles 25 | .Select(x => new { x.Id, x.Name }) 26 | .ToList(); 27 | return this.Request.CreateResponse(HttpStatusCode.OK, roles); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Controllers/ValuesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Web.Http; 7 | 8 | namespace WebAPI.Controllers 9 | { 10 | public class ValuesController : ApiController 11 | { 12 | // GET api/values 13 | public IEnumerable Get() 14 | { 15 | return new string[] { "value1", "value2" }; 16 | } 17 | 18 | // GET api/values/5 19 | public string Get(int id) 20 | { 21 | return "value"; 22 | } 23 | 24 | // POST api/values 25 | public void Post([FromBody]string value) 26 | { 27 | } 28 | 29 | // PUT api/values/5 30 | public void Put(int id, [FromBody]string value) 31 | { 32 | } 33 | 34 | // DELETE api/values/5 35 | public void Delete(int id) 36 | { 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="WebAPI.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Http; 6 | using System.Web.Mvc; 7 | using System.Web.Optimization; 8 | using System.Web.Routing; 9 | 10 | namespace WebAPI 11 | { 12 | public class WebApiApplication : System.Web.HttpApplication 13 | { 14 | protected void Application_Start() 15 | { 16 | AreaRegistration.RegisterAllAreas(); 17 | GlobalConfiguration.Configure(WebApiConfig.Register); 18 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 19 | RouteConfig.RegisterRoutes(RouteTable.Routes); 20 | BundleConfig.RegisterBundles(BundleTable.Bundles); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/201801311530466_InitailDB.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | namespace WebAPI.Migrations 3 | { 4 | using System.CodeDom.Compiler; 5 | using System.Data.Entity.Migrations; 6 | using System.Data.Entity.Migrations.Infrastructure; 7 | using System.Resources; 8 | 9 | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] 10 | public sealed partial class InitailDB : IMigrationMetadata 11 | { 12 | private readonly ResourceManager Resources = new ResourceManager(typeof(InitailDB)); 13 | 14 | string IMigrationMetadata.Id 15 | { 16 | get { return "201801311530466_InitailDB"; } 17 | } 18 | 19 | string IMigrationMetadata.Source 20 | { 21 | get { return null; } 22 | } 23 | 24 | string IMigrationMetadata.Target 25 | { 26 | get { return Resources.GetString("Target"); } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/201801311540510_ChangedDefaultTableNames.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | namespace WebAPI.Migrations 3 | { 4 | using System.CodeDom.Compiler; 5 | using System.Data.Entity.Migrations; 6 | using System.Data.Entity.Migrations.Infrastructure; 7 | using System.Resources; 8 | 9 | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] 10 | public sealed partial class ChangedDefaultTableNames : IMigrationMetadata 11 | { 12 | private readonly ResourceManager Resources = new ResourceManager(typeof(ChangedDefaultTableNames)); 13 | 14 | string IMigrationMetadata.Id 15 | { 16 | get { return "201801311540510_ChangedDefaultTableNames"; } 17 | } 18 | 19 | string IMigrationMetadata.Source 20 | { 21 | get { return null; } 22 | } 23 | 24 | string IMigrationMetadata.Target 25 | { 26 | get { return Resources.GetString("Target"); } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/201801311540510_ChangedDefaultTableNames.cs: -------------------------------------------------------------------------------- 1 | namespace WebAPI.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class ChangedDefaultTableNames : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | RenameTable(name: "dbo.AspNetRoles", newName: "Role"); 11 | RenameTable(name: "dbo.AspNetUserRoles", newName: "UserRole"); 12 | RenameTable(name: "dbo.AspNetUsers", newName: "User"); 13 | RenameTable(name: "dbo.AspNetUserClaims", newName: "UserClaim"); 14 | RenameTable(name: "dbo.AspNetUserLogins", newName: "UserLogin"); 15 | } 16 | 17 | public override void Down() 18 | { 19 | RenameTable(name: "dbo.UserLogin", newName: "AspNetUserLogins"); 20 | RenameTable(name: "dbo.UserClaim", newName: "AspNetUserClaims"); 21 | RenameTable(name: "dbo.User", newName: "AspNetUsers"); 22 | RenameTable(name: "dbo.UserRole", newName: "AspNetUserRoles"); 23 | RenameTable(name: "dbo.Role", newName: "AspNetRoles"); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/201801311545174_ChangedDefaultColumnNames.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | namespace WebAPI.Migrations 3 | { 4 | using System.CodeDom.Compiler; 5 | using System.Data.Entity.Migrations; 6 | using System.Data.Entity.Migrations.Infrastructure; 7 | using System.Resources; 8 | 9 | [GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")] 10 | public sealed partial class ChangedDefaultColumnNames : IMigrationMetadata 11 | { 12 | private readonly ResourceManager Resources = new ResourceManager(typeof(ChangedDefaultColumnNames)); 13 | 14 | string IMigrationMetadata.Id 15 | { 16 | get { return "201801311545174_ChangedDefaultColumnNames"; } 17 | } 18 | 19 | string IMigrationMetadata.Source 20 | { 21 | get { return null; } 22 | } 23 | 24 | string IMigrationMetadata.Target 25 | { 26 | get { return Resources.GetString("Target"); } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/201801311545174_ChangedDefaultColumnNames.cs: -------------------------------------------------------------------------------- 1 | namespace WebAPI.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity.Migrations; 5 | 6 | public partial class ChangedDefaultColumnNames : DbMigration 7 | { 8 | public override void Up() 9 | { 10 | AddColumn("dbo.User", "FirstName", c => c.String()); 11 | AddColumn("dbo.User", "LastName", c => c.String()); 12 | } 13 | 14 | public override void Down() 15 | { 16 | DropColumn("dbo.User", "LastName"); 17 | DropColumn("dbo.User", "FirstName"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Migrations/Configuration.cs: -------------------------------------------------------------------------------- 1 | namespace WebAPI.Migrations 2 | { 3 | using System; 4 | using System.Data.Entity; 5 | using System.Data.Entity.Migrations; 6 | using System.Linq; 7 | 8 | internal sealed class Configuration : DbMigrationsConfiguration 9 | { 10 | public Configuration() 11 | { 12 | AutomaticMigrationsEnabled = false; 13 | } 14 | 15 | protected override void Seed(WebAPI.Models.ApplicationDbContext context) 16 | { 17 | // This method will be called after migrating to the latest version. 18 | 19 | // You can use the DbSet.AddOrUpdate() helper extension method 20 | // to avoid creating duplicate seed data. E.g. 21 | // 22 | // context.People.AddOrUpdate( 23 | // p => p.FullName, 24 | // new Person { FullName = "Andrew Peters" }, 25 | // new Person { FullName = "Brice Lambson" }, 26 | // new Person { FullName = "Rowan Miller" } 27 | // ); 28 | // 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Models/AccountModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace WebAPI.Models 7 | { 8 | public class AccountModel 9 | { 10 | public string UserName { get; set; } 11 | public string Email { get; set; } 12 | public string Password { get; set; } 13 | public string FirstName { get; set; } 14 | public string LastName { get; set; } 15 | 16 | public string LoggedOn { get; set; } 17 | 18 | public string[] Roles { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity.EntityFramework; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Data.Entity; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace WebAPI.Models 9 | { 10 | public class ApplicationUser : IdentityUser 11 | { 12 | public string FirstName { get; set; } 13 | public string LastName { get; set; } 14 | } 15 | 16 | public class ApplicationDbContext : IdentityDbContext { 17 | 18 | public ApplicationDbContext() 19 | : base("DefaultConnection", throwIfV1Schema: false) 20 | { 21 | } 22 | 23 | protected override void OnModelCreating(DbModelBuilder modelBuilder) 24 | { 25 | base.OnModelCreating(modelBuilder); 26 | //AspNetUsers -> User 27 | modelBuilder.Entity() 28 | .ToTable("User"); 29 | //AspNetRoles -> Role 30 | modelBuilder.Entity() 31 | .ToTable("Role"); 32 | //AspNetUserRoles -> UserRole 33 | modelBuilder.Entity() 34 | .ToTable("UserRole"); 35 | //AspNetUserClaims -> UserClaim 36 | modelBuilder.Entity() 37 | .ToTable("UserClaim"); 38 | //AspNetUserLogins -> UserLogin 39 | modelBuilder.Entity() 40 | .ToTable("UserLogin"); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /WebAPI/WebAPI/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("WebAPI")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WebAPI")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5091a902-2079-448c-a93c-6d8b395fe790")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/Scripts/_references.js -------------------------------------------------------------------------------- /WebAPI/WebAPI/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using Microsoft.Owin; 4 | using Owin; 5 | using Microsoft.Owin.Cors; 6 | using Microsoft.Owin.Security.OAuth; 7 | 8 | [assembly: OwinStartup(typeof(WebAPI.Startup))] 9 | 10 | namespace WebAPI 11 | { 12 | public class Startup 13 | { 14 | public void Configuration(IAppBuilder app) 15 | { 16 | // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888 17 | 18 | app.UseCors(CorsOptions.AllowAll); 19 | 20 | OAuthAuthorizationServerOptions option = new OAuthAuthorizationServerOptions 21 | { 22 | TokenEndpointPath = new PathString("/token"), 23 | Provider = new ApplicationOAuthProvider(), 24 | AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(60), 25 | AllowInsecureHttp = true 26 | }; 27 | app.UseOAuthAuthorizationServer(option); 28 | app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions()); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | 
2 |

ASP.NET

3 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS, and JavaScript.

4 |

Learn more »

5 |
6 |
7 |
8 |

Getting started

9 |

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach 10 | a broad range of clients, including browsers and mobile devices. ASP.NET Web API 11 | is an ideal platform for building RESTful applications on the .NET Framework.

12 |

Learn more »

13 |
14 |
15 |

Get more libraries

16 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

17 |

Learn more »

18 |
19 |
20 |

Web Hosting

21 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

22 |

Learn more »

23 |
24 |
25 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = null; 3 | } 4 | 5 | 6 | 7 | 8 | 9 | Error 10 | 11 | 12 |
13 |

Error.

14 |

An error occurred while processing your request.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @Styles.Render("~/Content/css") 8 | @Scripts.Render("~/bundles/modernizr") 9 | 10 | 11 | 29 |
30 | @RenderBody() 31 |
32 |
33 |

© @DateTime.Now.Year - My ASP.NET Application

34 |
35 |
36 | 37 | @Scripts.Render("~/bundles/jquery") 38 | @Scripts.Render("~/bundles/bootstrap") 39 | @RenderSection("scripts", required: false) 40 | 41 | 42 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/WebAPI.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | False 6 | True 7 | 8 | False 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | CurrentPage 17 | True 18 | False 19 | False 20 | False 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | True 30 | True 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Antlr3.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Antlr3.Runtime.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Antlr3.Runtime.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Antlr3.Runtime.pdb -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.Owin.Cors.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.Owin.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/Owin.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.Cors.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.Helpers.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Http.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.Http.Cors.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Http.WebHost.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.Http.WebHost.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.Http.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.Mvc.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Optimization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.Optimization.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.Razor.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/System.Web.WebPages.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/WebAPI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/WebAPI.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/WebAPI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/WebAPI.pdb -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/WebGrease.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/bin/WebGrease.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/favicon.ico -------------------------------------------------------------------------------- /WebAPI/WebAPI/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebAPI/WebAPI/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebAPI/WebAPI/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.ChangedDefaultColumnNames.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.ChangedDefaultColumnNames.resources -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.ChangedDefaultTableNames.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.ChangedDefaultTableNames.resources -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.InitailDB.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.InitailDB.resources -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/WebAPI.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/WebAPI.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/WebAPI.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/WebAPI/obj/Debug/WebAPI.pdb -------------------------------------------------------------------------------- /WebAPI/WebAPI/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /WebAPI/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Antlr 5 | 3.4.1.9004 6 | Terence Parr 7 | Terence Parr 8 | false 9 | ANother Tool for Language Recognition, is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages. 10 | ANother Tool for Language Recognition, is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions containing actions in a variety of target languages. 11 | en-US 12 | 13 | -------------------------------------------------------------------------------- /WebAPI/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.dll -------------------------------------------------------------------------------- /WebAPI/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.pdb -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EntityFramework 5 | 6.1.3 6 | EntityFramework 7 | Microsoft 8 | Microsoft 9 | http://go.microsoft.com/fwlink/?LinkID=320539 10 | http://go.microsoft.com/fwlink/?LinkID=320540 11 | http://go.microsoft.com/fwlink/?LinkID=386613 12 | true 13 | Entity Framework is Microsoft's recommended data access technology for new applications. 14 | Entity Framework is Microsoft's recommended data access technology for new applications. 15 | en-US 16 | Microsoft EF Database Data O/RM ADO.NET 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/content/App.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/content/Web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.Utility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.Utility.dll -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.dll -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.psd1 -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/tools/about_EntityFramework.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_EntityFramework 3 | 4 | SHORT DESCRIPTION 5 | Provides information about Entity Framework commands. 6 | 7 | LONG DESCRIPTION 8 | This topic describes the Entity Framework commands. Entity Framework is 9 | Microsoft's recommended data access technology for new applications. 10 | 11 | The following Entity Framework cmdlets are used with Entity Framework 12 | Migrations. 13 | 14 | Cmdlet Description 15 | ----------------- --------------------------------------------------- 16 | Enable-Migrations Enables Code First Migrations in a project. 17 | 18 | Add-Migration Scaffolds a migration script for any pending model 19 | changes. 20 | 21 | Update-Database Applies any pending migrations to the database. 22 | 23 | Get-Migrations Displays the migrations that have been applied to 24 | the target database. 25 | 26 | The following Entity Framework cmdlets are used by NuGet packages that 27 | install Entity Framework providers. These commands are not usually used as 28 | part of normal application development. 29 | 30 | Cmdlet Description 31 | ------------------------------ --------------------------------------- 32 | Add-EFProvider Adds or updates an Entity Framework 33 | provider entry in the project config 34 | file. 35 | 36 | Add-EFDefaultConnectionFactory Adds or updates an Entity Framework 37 | default connection factory in the 38 | project config file. 39 | 40 | Initialize-EFConfiguration Initializes the Entity Framework 41 | section in the project config file and 42 | sets defaults. 43 | 44 | SEE ALSO 45 | Enable-Migrations 46 | Add-Migration 47 | Update-Database 48 | Get-Migrations 49 | -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/tools/migrate.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/EntityFramework.6.1.3/tools/migrate.exe -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/Microsoft.AspNet.Cors.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/Microsoft.AspNet.Cors.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/Microsoft.AspNet.Cors.5.2.3.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.Cors 5 | 5.2.3 6 | Microsoft ASP.NET Cross-Origin Support 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm 10 | http://www.asp.net/web-api 11 | http://go.microsoft.com/fwlink/?LinkID=288859 12 | false 13 | This package contains the core components to enable Cross-Origin Resource Sharing (CORS) in ASP.NET. 14 | This package contains the core components to enable Cross-Origin Resource Sharing (CORS) in ASP.NET. 15 | Please visit http://go.microsoft.com/fwlink/?LinkID=403010 to view the release notes. 16 | © Microsoft Corporation. All rights reserved. 17 | en-US 18 | Microsoft AspNet Cors Cross Origin 19 | 20 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/lib/net45/System.Web.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/lib/net45/System.Web.Cors.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.Identity.Core 5 | 2.2.1 6 | Microsoft ASP.NET Identity Core 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm 10 | true 11 | Core interfaces for ASP.NET Identity. 12 | Core interfaces for ASP.NET Identity. 13 | © Microsoft Corporation. All rights reserved. 14 | Identity Membership 15 | 16 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.Identity.EntityFramework 5 | 2.2.1 6 | Microsoft ASP.NET Identity EntityFramework 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm 10 | false 11 | ASP.NET Identity providers that use Entity Framework. 12 | ASP.NET Identity providers that use Entity Framework. 13 | © Microsoft Corporation. All rights reserved. 14 | Identity Membership 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.Identity.Owin 5 | 2.2.1 6 | Microsoft ASP.NET Identity Owin 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm 10 | false 11 | Owin implementation for ASP.NET Identity. 12 | Owin implementation for ASP.NET Identity. 13 | © Microsoft Corporation. All rights reserved. 14 | Identity Membership 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/Microsoft.AspNet.Mvc.5.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/Microsoft.AspNet.Mvc.5.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/Microsoft.AspNet.Mvc.5.0.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.Mvc 5 | 5.0.0 6 | Microsoft ASP.NET MVC 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm 10 | http://www.asp.net/mvc 11 | true 12 | This package contains the runtime assemblies for ASP.NET MVC. ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and that gives you full control over markup. 13 | This package contains the runtime assemblies for ASP.NET MVC. 14 | © Microsoft Corporation. All rights reserved. 15 | en-US 16 | Microsoft AspNet Mvc AspNetMvc 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/lib/net45/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/lib/net45/System.Web.Mvc.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/Microsoft.AspNet.Razor.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/Microsoft.AspNet.Razor.3.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/Microsoft.AspNet.Razor.3.0.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.Razor 5 | 3.0.0 6 | Microsoft ASP.NET Razor 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm 10 | http://www.asp.net/web-pages 11 | true 12 | This package contains the runtime assemblies for ASP.NET Web Pages. ASP.NET Web Pages and the new Razor syntax provide a fast, terse, clean and lightweight way to combine server code with HTML to create dynamic web content. 13 | This package contains the runtime assemblies for ASP.NET Web Pages. 14 | © Microsoft Corporation. All rights reserved. 15 | en-US 16 | Microsoft AspNet WebPages AspNetWebPages Razor 17 | 18 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/lib/net45/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/lib/net45/System.Web.Razor.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/Microsoft.AspNet.Web.Optimization.1.1.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/Microsoft.AspNet.Web.Optimization.1.1.1.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/Microsoft.AspNet.Web.Optimization.1.1.1.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.Web.Optimization 5 | 1.1.1 6 | Microsoft ASP.NET Web Optimization Framework 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm 10 | true 11 | ASP.NET Optimization introduces a way to bundle and optimize CSS and JavaScript files. 12 | ASP.NET Optimization introduces a way to bundle and optimize CSS and JavaScript files. 13 | © Microsoft Corporation. All rights reserved. 14 | Microsoft AspNet optimization bundling minification 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/lib/net40/System.Web.Optimization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/lib/net40/System.Web.Optimization.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.5.0.0/Microsoft.AspNet.WebApi.5.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.5.0.0/Microsoft.AspNet.WebApi.5.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.5.0.0/Microsoft.AspNet.WebApi.5.0.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.WebApi 5 | 5.0.0 6 | Microsoft ASP.NET Web API 2 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm 10 | http://www.asp.net/web-api 11 | false 12 | This package contains everything you need to host ASP.NET Web API on IIS. ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework. 13 | This package contains everything you need to host ASP.NET Web API on IIS. 14 | Please go here to view the release notes: http://go.microsoft.com/fwlink/?LinkID=320753&clcid=0x409 15 | © Microsoft Corporation. All rights reserved. 16 | en-US 17 | Microsoft AspNet WebApi AspNetWebApi 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.WebApi.Client 5 | 5.2.3 6 | Microsoft ASP.NET Web API 2.2 Client Libraries 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm 10 | http://www.asp.net/web-api 11 | http://go.microsoft.com/fwlink/?LinkID=288859 12 | false 13 | This package adds support for formatting and content negotiation to System.Net.Http. It includes support for JSON, XML, and form URL encoded data. 14 | This package adds support for formatting and content negotiation to System.Net.Http. 15 | Please visit http://go.microsoft.com/fwlink/?LinkID=403010 to view the release notes. 16 | © Microsoft Corporation. All rights reserved. 17 | en-US 18 | Microsoft AspNet WebApi AspNetWebApi HttpClient 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Content/web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.WebApi.Core 5 | 5.2.3 6 | Microsoft ASP.NET Web API 2.2 Core Libraries 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm 10 | http://www.asp.net/web-api 11 | http://go.microsoft.com/fwlink/?LinkID=288859 12 | false 13 | This package contains the core runtime assemblies for ASP.NET Web API. This package is used by hosts of the ASP.NET Web API runtime. To host a Web API in IIS use the Microsoft.AspNet.WebApi.WebHost package. To host a Web API in your own process use the Microsoft.AspNet.WebApi.SelfHost package. 14 | This package contains the core runtime assemblies for ASP.NET Web API. 15 | Please visit http://go.microsoft.com/fwlink/?LinkID=403010 to view the release notes. 16 | © Microsoft Corporation. All rights reserved. 17 | en-US 18 | Microsoft AspNet WebApi AspNetWebApi 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Cors.5.2.3/Microsoft.AspNet.WebApi.Cors.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.Cors.5.2.3/Microsoft.AspNet.WebApi.Cors.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Cors.5.2.3/Microsoft.AspNet.WebApi.Cors.5.2.3.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.WebApi.Cors 5 | 5.2.3 6 | Microsoft ASP.NET Web API 2.2 Cross-Origin Support 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm 10 | http://www.asp.net/web-api 11 | http://go.microsoft.com/fwlink/?LinkID=288859 12 | false 13 | This package contains the components to enable Cross-Origin Resource Sharing (CORS) in ASP.NET Web API. 14 | This package contains the components to enable Cross-Origin Resource Sharing (CORS) in ASP.NET Web API. 15 | Please visit http://go.microsoft.com/fwlink/?LinkID=403010 to view the release notes. 16 | © Microsoft Corporation. All rights reserved. 17 | en-US 18 | Microsoft AspNet WebApi AspNetWebApi Cors Cross Origin 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Cors.5.2.3/lib/net45/System.Web.Http.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.Cors.5.2.3/lib/net45/System.Web.Http.Cors.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/Microsoft.AspNet.WebApi.HelpPage.5.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/Microsoft.AspNet.WebApi.HelpPage.5.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/Microsoft.AspNet.WebApi.HelpPage.5.0.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.WebApi.HelpPage 5 | 5.0.0 6 | Microsoft ASP.NET Web API Help Page 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm 10 | http://www.asp.net/web-api 11 | true 12 | The ASP.NET Web API Help Page automatically generates help page content for the web APIs on your site. Visitors to your help page can use this content to learn how to call your web APIs. Everything generated by the help page is fully customizable using ASP.NET MVC and Razor. ASP.NET Web API Help Page is a great addition to any ASP.NET Web API project. 13 | The ASP.NET Web API Help Page automatically generates help page content for the web APIs on your site. 14 | © Microsoft Corporation. All rights reserved. 15 | en-US 16 | Microsoft AspNet WebApi AspNetWebApi HelpPage 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/ApiDescriptionExtensions.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Web; 4 | using System.Web.Http.Description; 5 | 6 | namespace $rootnamespace$.Areas.HelpPage 7 | { 8 | public static class ApiDescriptionExtensions 9 | { 10 | /// 11 | /// Generates an URI-friendly ID for the . E.g. "Get-Values-id_name" instead of "GetValues/{id}?name={name}" 12 | /// 13 | /// The . 14 | /// The ID as a string. 15 | public static string GetFriendlyId(this ApiDescription description) 16 | { 17 | string path = description.RelativePath; 18 | string[] urlParts = path.Split('?'); 19 | string localPath = urlParts[0]; 20 | string queryKeyString = null; 21 | if (urlParts.Length > 1) 22 | { 23 | string query = urlParts[1]; 24 | string[] queryKeys = HttpUtility.ParseQueryString(query).AllKeys; 25 | queryKeyString = String.Join("_", queryKeys); 26 | } 27 | 28 | StringBuilder friendlyPath = new StringBuilder(); 29 | friendlyPath.AppendFormat("{0}-{1}", 30 | description.HttpMethod.Method, 31 | localPath.Replace("/", "-").Replace("{", String.Empty).Replace("}", String.Empty)); 32 | if (queryKeyString != null) 33 | { 34 | friendlyPath.AppendFormat("_{0}", queryKeyString); 35 | } 36 | return friendlyPath.ToString(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Controllers/HelpController.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Http; 3 | using System.Web.Mvc; 4 | using $rootnamespace$.Areas.HelpPage.Models; 5 | 6 | namespace $rootnamespace$.Areas.HelpPage.Controllers 7 | { 8 | /// 9 | /// The controller that will handle requests for the help page. 10 | /// 11 | public class HelpController : Controller 12 | { 13 | public HelpController() 14 | : this(GlobalConfiguration.Configuration) 15 | { 16 | } 17 | 18 | public HelpController(HttpConfiguration config) 19 | { 20 | Configuration = config; 21 | } 22 | 23 | public HttpConfiguration Configuration { get; private set; } 24 | 25 | public ActionResult Index() 26 | { 27 | ViewBag.DocumentationProvider = Configuration.Services.GetDocumentationProvider(); 28 | return View(Configuration.Services.GetApiExplorer().ApiDescriptions); 29 | } 30 | 31 | public ActionResult Api(string apiId) 32 | { 33 | if (!String.IsNullOrEmpty(apiId)) 34 | { 35 | HelpPageApiModel apiModel = Configuration.GetHelpPageApiModel(apiId); 36 | if (apiModel != null) 37 | { 38 | return View(apiModel); 39 | } 40 | } 41 | 42 | return View("Error"); 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/HelpPage.css.pp: -------------------------------------------------------------------------------- 1 | pre.wrapped { 2 | white-space: -moz-pre-wrap; 3 | white-space: -pre-wrap; 4 | white-space: -o-pre-wrap; 5 | white-space: pre-wrap; 6 | } 7 | 8 | .warning-message-container { 9 | margin-top: 20px; 10 | padding: 0 10px; 11 | color: #525252; 12 | background: #EFDCA9; 13 | border: 1px solid #CCCCCC; 14 | } 15 | 16 | .help-page-table { 17 | width: 100%; 18 | border-collapse: collapse; 19 | text-align: left; 20 | margin: 0px 0px 20px 0px; 21 | border-top: 2px solid #D4D4D4; 22 | } 23 | 24 | .help-page-table th { 25 | text-align: left; 26 | font-weight: bold; 27 | border-bottom: 2px solid #D4D4D4; 28 | padding: 8px 6px 8px 6px; 29 | } 30 | 31 | .help-page-table td { 32 | border-bottom: 2px solid #D4D4D4; 33 | padding: 15px 8px 15px 8px; 34 | vertical-align: top; 35 | } 36 | 37 | .help-page-table pre, .help-page-table p { 38 | margin: 0px; 39 | padding: 0px; 40 | font-family: inherit; 41 | font-size: 100%; 42 | } 43 | 44 | .help-page-table tbody tr:hover td { 45 | background-color: #F3F3F3; 46 | } 47 | 48 | a:hover { 49 | background-color: transparent; 50 | } 51 | 52 | .sample-header { 53 | border: 2px solid #D4D4D4; 54 | background: #76B8DB; 55 | color: #FFFFFF; 56 | padding: 8px 15px; 57 | border-bottom: none; 58 | display: inline-block; 59 | margin: 10px 0px 0px 0px; 60 | } 61 | 62 | .sample-content { 63 | display: block; 64 | border-width: 0; 65 | padding: 15px 20px; 66 | background: #FFFFFF; 67 | border: 2px solid #D4D4D4; 68 | margin: 0px 0px 10px 0px; 69 | } 70 | 71 | .api-name { 72 | width: 40%; 73 | } 74 | 75 | .api-documentation { 76 | width: 60%; 77 | } 78 | 79 | .parameter-name { 80 | width: 20%; 81 | } 82 | 83 | .parameter-documentation { 84 | width: 50%; 85 | } 86 | 87 | .parameter-source { 88 | width: 30%; 89 | } 90 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/HelpPageAreaRegistration.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | 4 | namespace $rootnamespace$.Areas.HelpPage 5 | { 6 | public class HelpPageAreaRegistration : AreaRegistration 7 | { 8 | public override string AreaName 9 | { 10 | get 11 | { 12 | return "HelpPage"; 13 | } 14 | } 15 | 16 | public override void RegisterArea(AreaRegistrationContext context) 17 | { 18 | context.MapRoute( 19 | "HelpPage_Default", 20 | "Help/{action}/{apiId}", 21 | new { controller = "Help", action = "Index", apiId = UrlParameter.Optional }); 22 | 23 | HelpPageConfig.Register(GlobalConfiguration.Configuration); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Models/HelpPageApiModel.cs.pp: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using System.Net.Http.Headers; 4 | using System.Web.Http.Description; 5 | 6 | namespace $rootnamespace$.Areas.HelpPage.Models 7 | { 8 | /// 9 | /// The model that represents an API displayed on the help page. 10 | /// 11 | public class HelpPageApiModel 12 | { 13 | /// 14 | /// Initializes a new instance of the class. 15 | /// 16 | public HelpPageApiModel() 17 | { 18 | SampleRequests = new Dictionary(); 19 | SampleResponses = new Dictionary(); 20 | ErrorMessages = new Collection(); 21 | } 22 | 23 | /// 24 | /// Gets or sets the that describes the API. 25 | /// 26 | public ApiDescription ApiDescription { get; set; } 27 | 28 | /// 29 | /// Gets the sample requests associated with the API. 30 | /// 31 | public IDictionary SampleRequests { get; private set; } 32 | 33 | /// 34 | /// Gets the sample responses associated with the API. 35 | /// 36 | public IDictionary SampleResponses { get; private set; } 37 | 38 | /// 39 | /// Gets the error messages associated with this model. 40 | /// 41 | public Collection ErrorMessages { get; private set; } 42 | } 43 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/SampleGeneration/ImageSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an image sample on the help page. There's a display template named ImageSample associated with this class. 7 | /// 8 | public class ImageSample 9 | { 10 | /// 11 | /// Initializes a new instance of the class. 12 | /// 13 | /// The URL of an image. 14 | public ImageSample(string src) 15 | { 16 | if (src == null) 17 | { 18 | throw new ArgumentNullException("src"); 19 | } 20 | Src = src; 21 | } 22 | 23 | public string Src { get; private set; } 24 | 25 | public override bool Equals(object obj) 26 | { 27 | ImageSample other = obj as ImageSample; 28 | return other != null && Src == other.Src; 29 | } 30 | 31 | public override int GetHashCode() 32 | { 33 | return Src.GetHashCode(); 34 | } 35 | 36 | public override string ToString() 37 | { 38 | return Src; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/SampleGeneration/InvalidSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class. 7 | /// 8 | public class InvalidSample 9 | { 10 | public InvalidSample(string errorMessage) 11 | { 12 | if (errorMessage == null) 13 | { 14 | throw new ArgumentNullException("errorMessage"); 15 | } 16 | ErrorMessage = errorMessage; 17 | } 18 | 19 | public string ErrorMessage { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | InvalidSample other = obj as InvalidSample; 24 | return other != null && ErrorMessage == other.ErrorMessage; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return ErrorMessage.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return ErrorMessage; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/SampleGeneration/SampleDirection.cs.pp: -------------------------------------------------------------------------------- 1 | namespace $rootnamespace$.Areas.HelpPage 2 | { 3 | /// 4 | /// Indicates whether the sample is used for request or response 5 | /// 6 | public enum SampleDirection 7 | { 8 | Request = 0, 9 | Response 10 | } 11 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/SampleGeneration/TextSample.cs.pp: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace $rootnamespace$.Areas.HelpPage 4 | { 5 | /// 6 | /// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class. 7 | /// 8 | public class TextSample 9 | { 10 | public TextSample(string text) 11 | { 12 | if (text == null) 13 | { 14 | throw new ArgumentNullException("text"); 15 | } 16 | Text = text; 17 | } 18 | 19 | public string Text { get; private set; } 20 | 21 | public override bool Equals(object obj) 22 | { 23 | TextSample other = obj as TextSample; 24 | return other != null && Text == other.Text; 25 | } 26 | 27 | public override int GetHashCode() 28 | { 29 | return Text.GetHashCode(); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Text; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/Api.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using $rootnamespace$.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | ViewBag.Title = description.HttpMethod.Method + " " + description.RelativePath; 8 | } 9 | 10 |
11 | 18 |
19 | @Html.DisplayFor(m => Model) 20 |
21 |
22 | 23 | @section Scripts { 24 | 25 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/DisplayTemplates/ApiGroup.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using $rootnamespace$.Areas.HelpPage 5 | @using $rootnamespace$.Areas.HelpPage.Models 6 | @model IGrouping 7 | 8 | @{ 9 | var controllerDocumentation = ViewBag.DocumentationProvider != null ? 10 | ViewBag.DocumentationProvider.GetDocumentation(Model.Key) : 11 | null; 12 | } 13 | 14 |

@Model.Key.ControllerName

15 | @if (!String.IsNullOrEmpty(controllerDocumentation)) 16 | { 17 |

@controllerDocumentation

18 | } 19 | 20 | 21 | 22 | 23 | 24 | @foreach (var api in Model) 25 | { 26 | 27 | 28 | 38 | 39 | } 40 | 41 |
APIDescription
@api.HttpMethod.Method @api.RelativePath 29 | @if (api.Documentation != null) 30 | { 31 |

@api.Documentation

32 | } 33 | else 34 | { 35 |

No documentation available.

36 | } 37 |
-------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/DisplayTemplates/HelpPageApiModel.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using $rootnamespace$.Areas.HelpPage.Models 3 | @model HelpPageApiModel 4 | 5 | @{ 6 | var description = Model.ApiDescription; 7 | bool hasParameters = description.ParameterDescriptions.Count > 0; 8 | bool hasRequestSamples = Model.SampleRequests.Count > 0; 9 | bool hasResponseSamples = Model.SampleResponses.Count > 0; 10 | } 11 |

@description.HttpMethod.Method @description.RelativePath

12 |
13 | @if (description.Documentation != null) 14 | { 15 |

@description.Documentation

16 | } 17 | else 18 | { 19 |

No documentation available.

20 | } 21 | 22 | @if (hasParameters || hasRequestSamples) 23 | { 24 |

Request Information

25 | if (hasParameters) 26 | { 27 |

Parameters

28 | @Html.DisplayFor(apiModel => apiModel.ApiDescription.ParameterDescriptions, "Parameters") 29 | } 30 | if (hasRequestSamples) 31 | { 32 |

Request body formats

33 | @Html.DisplayFor(apiModel => apiModel.SampleRequests, "Samples") 34 | } 35 | } 36 | 37 | @if (hasResponseSamples) 38 | { 39 |

Response Information

40 | if (description.ResponseDescription.Documentation != null) 41 | { 42 |

@description.ResponseDescription.Documentation

43 | } 44 | else 45 | { 46 |

No documentation available.

47 | } 48 |

Response body formats

49 | @Html.DisplayFor(apiModel => apiModel.SampleResponses, "Samples") 50 | } 51 |
-------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/DisplayTemplates/InvalidSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model InvalidSample 3 | 4 | @if (HttpContext.Current.IsDebuggingEnabled) 5 | { 6 |
7 |

@Model.ErrorMessage

8 |
9 | } 10 | else 11 | { 12 |

Sample not available.

13 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/DisplayTemplates/Parameters.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Collections.ObjectModel 2 | @using System.Web.Http.Description 3 | @using System.Threading 4 | @model Collection 5 | 6 | 7 | 8 | 9 | 10 | 11 | @foreach (ApiParameterDescription parameter in Model) 12 | { 13 | string parameterDocumentation = parameter.Documentation != null ? 14 | parameter.Documentation : 15 | "No documentation available."; 16 | 17 | // Don't show CancellationToken because it's a special parameter 18 | if (parameter.ParameterDescriptor == null || 19 | (parameter.ParameterDescriptor != null && 20 | !typeof(CancellationToken).IsAssignableFrom(parameter.ParameterDescriptor.ParameterType))) 21 | { 22 | 23 | 24 | 25 | 40 | 41 | } 42 | } 43 | 44 |
NameDescriptionAdditional information
@parameter.Name
@parameterDocumentation
26 | @switch (parameter.Source) 27 | { 28 | case ApiParameterSource.FromBody: 29 |

Define this parameter in the request body.

30 | break; 31 | case ApiParameterSource.FromUri: 32 |

Define this parameter in the request URI.

33 | break; 34 | case ApiParameterSource.Unknown: 35 | default: 36 |

None.

37 | break; 38 | } 39 |
-------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/DisplayTemplates/Samples.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Net.Http.Headers 2 | @model Dictionary 3 | 4 | @{ 5 | // Group the samples into a single tab if they are the same. 6 | Dictionary samples = Model.GroupBy(pair => pair.Value).ToDictionary( 7 | pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()), 8 | pair => pair.Key); 9 | var mediaTypes = samples.Keys; 10 | } 11 |
12 | @foreach (var mediaType in mediaTypes) 13 | { 14 |

@mediaType

15 |
16 | Sample: 17 | @{ 18 | var sample = samples[mediaType]; 19 | if (sample == null) 20 | { 21 |

Sample not available.

22 | } 23 | else 24 | { 25 | @Html.DisplayFor(s => sample); 26 | } 27 | } 28 |
29 | } 30 |
-------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/DisplayTemplates/TextSample.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using $rootnamespace$.Areas.HelpPage 2 | @model TextSample 3 | 4 |
5 | @Model.Text
6 | 
-------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Help/Index.cshtml.pp: -------------------------------------------------------------------------------- 1 | @using System.Web.Http 2 | @using System.Web.Http.Controllers 3 | @using System.Web.Http.Description 4 | @using System.Collections.ObjectModel 5 | @using $rootnamespace$.Areas.HelpPage.Models 6 | @model Collection 7 | 8 | @{ 9 | ViewBag.Title = "ASP.NET Web API Help Page"; 10 | 11 | // Group APIs by controller 12 | ILookup apiGroups = Model.ToLookup(api => api.ActionDescriptor.ControllerDescriptor); 13 | } 14 | 15 |
16 |
17 |
18 |

@ViewBag.Title

19 |
20 |
21 |
22 |
23 | 31 |
32 | @foreach (var group in apiGroups) 33 | { 34 | @Html.DisplayFor(m => group, "ApiGroup") 35 | } 36 |
37 |
38 | 39 | @section Scripts { 40 | 41 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/Shared/_Layout.cshtml.pp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/content/Areas/HelpPage/Views/_ViewStart.cshtml.pp: -------------------------------------------------------------------------------- 1 | @{ 2 | // Change the Layout path below to blend the look and feel of the help page with your existing web pages. 3 | Layout = "~/Areas/HelpPage/Views/Shared/_Layout.cshtml"; 4 | } -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/Microsoft.AspNet.WebApi.WebHost.5.2.3.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.WebApi.WebHost 5 | 5.2.3 6 | Microsoft ASP.NET Web API 2.2 Web Host 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm 10 | http://www.asp.net/web-api 11 | http://go.microsoft.com/fwlink/?LinkID=288859 12 | true 13 | This package contains everything you need to host ASP.NET Web API on IIS. ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework. 14 | This package contains everything you need to host ASP.NET Web API on IIS. 15 | Please visit http://go.microsoft.com/fwlink/?LinkID=403010 to view the release notes. 16 | © Microsoft Corporation. All rights reserved. 17 | en-US 18 | Microsoft AspNet WebApi AspNetWebApi WebHost 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/lib/net45/System.Web.Http.WebHost.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/lib/net45/System.Web.Http.WebHost.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/Microsoft.AspNet.WebPages.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/Microsoft.AspNet.WebPages.3.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/Microsoft.AspNet.WebPages.3.0.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.AspNet.WebPages 5 | 3.0.0 6 | Microsoft ASP.NET Web Pages 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_ENU.htm 10 | http://www.asp.net/web-pages 11 | true 12 | This package contains core runtime assemblies shared between ASP.NET MVC and ASP.NET Web Pages. 13 | This package contains core runtime assemblies shared between ASP.NET MVC and ASP.NET Web Pages. 14 | © Microsoft Corporation. All rights reserved. 15 | en-US 16 | Microsoft AspNet WebPages AspNetWebPages 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.Helpers.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.3.1.0/Microsoft.Owin.3.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.3.1.0/Microsoft.Owin.3.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.3.1.0/Microsoft.Owin.3.1.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Owin 5 | 3.1.0 6 | Microsoft.Owin 7 | Microsoft 8 | Microsoft 9 | https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm 10 | https://github.com/aspnet/AspNetKatana/ 11 | true 12 | Provides a set of helper types and abstractions for simplifying the creation of OWIN components. 13 | Microsoft OWIN Katana 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.3.1.0/lib/net45/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.3.1.0/lib/net45/Microsoft.Owin.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Cors.3.1.0/Microsoft.Owin.Cors.3.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Cors.3.1.0/Microsoft.Owin.Cors.3.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Cors.3.1.0/Microsoft.Owin.Cors.3.1.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Owin.Cors 5 | 3.1.0 6 | Microsoft.Owin.Cors 7 | Microsoft 8 | Microsoft 9 | https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm 10 | https://github.com/aspnet/AspNetKatana/ 11 | false 12 | This package contains the components to enable Cross-Origin Resource Sharing (CORS) in OWIN middleware. 13 | 14 | Microsoft OWIN Katana 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Cors.3.1.0/lib/net45/Microsoft.Owin.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Cors.3.1.0/lib/net45/Microsoft.Owin.Cors.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Host.SystemWeb.3.1.0/Microsoft.Owin.Host.SystemWeb.3.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Host.SystemWeb.3.1.0/Microsoft.Owin.Host.SystemWeb.3.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Host.SystemWeb.3.1.0/Microsoft.Owin.Host.SystemWeb.3.1.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Owin.Host.SystemWeb 5 | 3.1.0 6 | Microsoft.Owin.Host.SystemWeb 7 | Microsoft 8 | Microsoft 9 | https://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm 10 | https://github.com/aspnet/AspNetKatana/ 11 | false 12 | OWIN server that enables OWIN-based applications to run on IIS using the ASP.NET request pipeline. 13 | 14 | Microsoft OWIN Katana 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Host.SystemWeb.3.1.0/lib/net45/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Host.SystemWeb.3.1.0/lib/net45/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Owin.Security 5 | 2.1.0 6 | Microsoft.Owin.Security 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm 10 | http://katanaproject.codeplex.com/ 11 | true 12 | Common types which are shared by the various authentication middleware components. 13 | Microsoft OWIN Katana 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.2.1.0/lib/net45/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Security.2.1.0/lib/net45/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Owin.Security.Cookies 5 | 2.1.0 6 | Microsoft.Owin.Security.Cookies 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm 10 | http://katanaproject.codeplex.com/ 11 | true 12 | Middleware that enables an application to use cookie based authentication, similar to ASP.NET's forms authentication. 13 | Microsoft OWIN Katana 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Owin.Security.OAuth 5 | 2.1.0 6 | Microsoft.Owin.Security.OAuth 7 | Microsoft 8 | Microsoft 9 | http://www.microsoft.com/web/webpi/eula/aspnetcomponent_rtw_enu.htm 10 | http://katanaproject.codeplex.com/ 11 | true 12 | Middleware that enables an application to support any standard OAuth 2.0 authentication workflow. 13 | Microsoft OWIN Katana 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.OAuth.2.1.0/lib/net45/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Owin.Security.OAuth.2.1.0/lib/net45/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Web.Infrastructure 5 | 1.0.0.0 6 | Microsoft.Web.Infrastructure 7 | Microsoft 8 | Microsoft 9 | http://go.microsoft.com/fwlink/?LinkID=214339 10 | http://www.asp.net 11 | false 12 | This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. 13 | en-US 14 | 15 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /WebAPI/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Modernizr.2.6.2/Modernizr.2.6.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Modernizr 5 | 2.6.2 6 | Modernizr 7 | Faruk Ateş,Paul Irish,Alex Sexton 8 | Faruk Ateş,Paul Irish,Alex Sexton 9 | http://www.modernizr.com/license/ 10 | http://www.modernizr.com/ 11 | http://www.modernizr.com/i/logo.png 12 | false 13 | Modernizr adds classes to the <html> element which allow you to target specific browser functionality in your stylesheet. You don't actually need to write any Javascript to use it. 14 | Modernizr is a small and simple JavaScript library that helps you take advantage of emerging web technologies (CSS3, HTML5) while still maintaining a fine level of control over older browsers that may not yet support these new technologies. 15 | NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at http://nugetpackages.codeplex.com/ 16 | Modernizr is a small and simple JavaScript library that helps you take advantage of emerging web technologies (CSS3, HTML 5) while still maintaining a fine level of control over older browsers that may not yet support these new technologies. 17 | en-US 18 | JavaScript HTML HTML5 CSS CSS3 SVG 19 | 20 | -------------------------------------------------------------------------------- /WebAPI/packages/Modernizr.2.6.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | if ($scriptsFolderProjectItem -eq $null) { 6 | # No Scripts folder 7 | Write-Host "No Scripts folder found" 8 | exit 9 | } 10 | 11 | # Update the _references.js file 12 | AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx $modernizrFileName -------------------------------------------------------------------------------- /WebAPI/packages/Modernizr.2.6.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Update the _references.js file 6 | Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/Newtonsoft.Json.6.0.8.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Newtonsoft.Json.6.0.8/Newtonsoft.Json.6.0.8.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/Newtonsoft.Json.6.0.8.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Newtonsoft.Json 5 | 6.0.8 6 | Json.NET 7 | James Newton-King 8 | James Newton-King 9 | https://raw.github.com/JamesNK/Newtonsoft.Json/master/LICENSE.md 10 | http://www.newtonsoft.com/json 11 | http://www.newtonsoft.com/content/images/nugeticon.png 12 | false 13 | Json.NET is a popular high-performance JSON framework for .NET 14 | 15 | en-US 16 | json 17 | 18 | -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/netcore45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/netcore45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/portable-net45+wp80+win8+wpa81+aspnetcore50/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/portable-net45+wp80+win8+wpa81+aspnetcore50/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Owin.1.0/Owin.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Owin.1.0/Owin.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Owin.1.0/Owin.1.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Owin 5 | 1.0 6 | OWIN 7 | OWIN startup components contributors 8 | OWIN startup components contributors 9 | https://github.com/owin-contrib/owin-hosting/blob/master/LICENSE.txt 10 | https://github.com/owin-contrib/owin-hosting/ 11 | false 12 | OWIN IAppBuilder startup interface 13 | OWIN 14 | 15 | -------------------------------------------------------------------------------- /WebAPI/packages/Owin.1.0/lib/net40/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Owin.1.0/lib/net40/Owin.dll -------------------------------------------------------------------------------- /WebAPI/packages/Respond.1.2.0/Respond.1.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/Respond.1.2.0/Respond.1.2.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Respond.1.2.0/Respond.1.2.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Respond 5 | 1.2.0 6 | Respond JS 7 | Scott Jehl 8 | Scott Jehl,scottjehl.com 9 | https://github.com/scottjehl/Respond 10 | https://github.com/scottjehl/Respond 11 | true 12 | The goal of this script is to provide a fast and lightweight (3kb minified / 1kb gzipped) script to enable responsive web designs in browsers that don't support CSS3 Media Queries - in particular, Internet Explorer 8 and under. It's written in such a way that it will probably patch support for other non-supporting browsers as well (more information on that soon). 13 | A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more) 14 | Merge pull request #104 from scottjehl/cross-domain Resolves Issue #59: Cross domain CSS files with ? in URL won't load 15 | 2011: Scott Jehl, scottjehl.com 16 | Respond, Media Queries 17 | 18 | -------------------------------------------------------------------------------- /WebAPI/packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/WebGrease.1.5.2/WebGrease.1.5.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WebGrease 5 | 1.5.2 6 | webgrease@microsoft.com 7 | Microsoft 8 | http://www.microsoft.com/web/webpi/eula/msn_webgrease_eula.htm 9 | true 10 | Web Grease is a suite of tools for optimizing javascript, css files and images. 11 | en-US 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /WebAPI/packages/WebGrease.1.5.2/lib/WebGrease.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/WebGrease.1.5.2/lib/WebGrease.dll -------------------------------------------------------------------------------- /WebAPI/packages/WebGrease.1.5.2/tools/WG.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/WebGrease.1.5.2/tools/WG.exe -------------------------------------------------------------------------------- /WebAPI/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/bootstrap.3.0.0/bootstrap.3.0.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bootstrap 5 | 3.0.0 6 | Mark Otto,Jacob Thornton 7 | outercurve 8 | https://github.com/twbs/bootstrap/blob/master/LICENSE 9 | https://github.com/twbs/bootstrap 10 | https://github.com/twbs/bootstrap/blob/master/assets/ico/apple-touch-icon-72-precomposed.png 11 | false 12 | Sleek, intuitive, and powerful front-end framework for faster and easier web development. 13 | 14 | Copyright 2012 15 | Twitter bootstrap html5 css3 16 | 17 | -------------------------------------------------------------------------------- /WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WebAPI/packages/jQuery.1.10.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # VS 11 and above supports the new intellisense JS files 6 | $vsVersion = [System.Version]::Parse($dte.Version) 7 | $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 8 | 9 | if (-not $supportsJsIntelliSenseFile) { 10 | $displayVersion = $vsVersion.Major 11 | Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion" 12 | exit 13 | } 14 | 15 | if ($scriptsFolderProjectItem -eq $null) { 16 | # No Scripts folder 17 | Write-Host "No Scripts folder found" 18 | exit 19 | } 20 | 21 | # Delete the vsdoc file from the project 22 | try { 23 | $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js") 24 | Delete-ProjectItem $vsDocProjectItem 25 | } 26 | catch { 27 | Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red 28 | exit 29 | } 30 | 31 | # Copy the intellisense file to the project from the tools folder 32 | $intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName 33 | try { 34 | $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath) 35 | } 36 | catch { 37 | # This will throw if the file already exists, so we need to catch here 38 | } 39 | 40 | # Update the _references.js file 41 | AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName -------------------------------------------------------------------------------- /WebAPI/packages/jQuery.1.10.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Determine the file paths 6 | $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName 7 | $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName 8 | 9 | if (Test-Path $projectIntelliSenseFilePath) { 10 | if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) { 11 | # The intellisense file in the project matches the file in the tools folder, delete it 12 | 13 | if ($scriptsFolderProjectItem -eq $null) { 14 | # No Scripts folder 15 | exit 16 | } 17 | 18 | try { 19 | # Get the project item for the intellisense file 20 | $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName) 21 | } 22 | catch { 23 | # The item wasn't found 24 | exit 25 | } 26 | 27 | # Delete the project item 28 | Delete-ProjectItem $intelliSenseFileProjectItem 29 | } 30 | else { 31 | $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf 32 | Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta 33 | } 34 | } 35 | else { 36 | # The intellisense file was not found in project 37 | Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath" 38 | } 39 | 40 | # Update the _references.js file 41 | Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx -------------------------------------------------------------------------------- /WebAPI/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5---Role-Based-Authorization-with-Web-API/f102ab8906e06a96a31d212a25e25b1f1cd6017e/WebAPI/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/jQuery.1.10.2/jQuery.1.10.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery 5 | 1.10.2 6 | jQuery 7 | jQuery Foundation,Inc. 8 | jQuery Foundation,Inc. 9 | http://jquery.org/license 10 | http://jquery.com/ 11 | false 12 | jQuery is a new kind of JavaScript Library. 13 | jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. 14 | NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at http://nugetpackages.codeplex.com/ 15 | en-US 16 | jQuery 17 | 18 | -------------------------------------------------------------------------------- /WebAPI/packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | --------------------------------------------------------------------------------