├── Angular5 ├── src │ ├── assets │ │ └── .gitkeep │ ├── app │ │ ├── app.component.css │ │ ├── home │ │ │ ├── home.component.css │ │ │ ├── home.component.spec.ts │ │ │ ├── home.component.ts │ │ │ └── home.component.html │ │ ├── user │ │ │ ├── user.component.css │ │ │ ├── sign-in │ │ │ │ ├── sign-in.component.css │ │ │ │ ├── sign-in.component.spec.ts │ │ │ │ ├── sign-in.component.ts │ │ │ │ └── sign-in.component.html │ │ │ ├── sign-up │ │ │ │ ├── sign-up.component.css │ │ │ │ ├── sign-up.component.spec.ts │ │ │ │ ├── sign-up.component.ts │ │ │ │ └── sign-up.component.html │ │ │ ├── user.component.ts │ │ │ ├── user.component.spec.ts │ │ │ └── user.component.html │ │ ├── app.component.html │ │ ├── shared │ │ │ ├── user.model.ts │ │ │ ├── user.service.spec.ts │ │ │ └── user.service.ts │ │ ├── app.component.ts │ │ ├── auth │ │ │ ├── auth.guard.spec.ts │ │ │ ├── auth.guard.ts │ │ │ └── auth.interceptor.ts │ │ ├── routes.ts │ │ ├── app.component.spec.ts │ │ └── app.module.ts │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── typings.d.ts │ ├── favicon.ico │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── main.ts │ ├── index.html │ ├── styles.css │ ├── test.ts │ └── polyfills.ts ├── e2e │ ├── app.po.ts │ ├── tsconfig.e2e.json │ └── app.e2e-spec.ts ├── .editorconfig ├── tsconfig.json ├── .gitignore ├── protractor.conf.js ├── karma.conf.js ├── README.md ├── package.json └── .angular-cli.json ├── WebAPI ├── WebAPI │ ├── obj │ │ └── Debug │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ ├── WebAPI.dll │ │ │ ├── WebAPI.pdb │ │ │ ├── WebAPI.Migrations.InitailDB.resources │ │ │ ├── WebAPI.csproj.GenerateResource.Cache │ │ │ ├── WebAPI.csprojResolveAssemblyReference.cache │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── WebAPI.Migrations.ChangedDefaultTableNames.resources │ │ │ └── WebAPI.Migrations.ChangedDefaultColumnNames.resources │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ └── Web.config │ ├── Global.asax │ ├── Areas │ │ └── HelpPage │ │ │ ├── Views │ │ │ ├── Help │ │ │ │ ├── DisplayTemplates │ │ │ │ │ ├── ImageSample.cshtml │ │ │ │ │ ├── TextSample.cshtml │ │ │ │ │ ├── InvalidSample.cshtml │ │ │ │ │ ├── Samples.cshtml │ │ │ │ │ ├── ApiGroup.cshtml │ │ │ │ │ ├── HelpPageApiModel.cshtml │ │ │ │ │ └── Parameters.cshtml │ │ │ │ ├── Api.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── _ViewStart.cshtml │ │ │ └── Shared │ │ │ │ └── _Layout.cshtml │ │ │ ├── SampleGeneration │ │ │ ├── SampleDirection.cs │ │ │ ├── TextSample.cs │ │ │ ├── InvalidSample.cs │ │ │ └── ImageSample.cs │ │ │ ├── HelpPageAreaRegistration.cs │ │ │ ├── Controllers │ │ │ └── HelpController.cs │ │ │ ├── ApiDescriptionExtensions.cs │ │ │ ├── Models │ │ │ └── HelpPageApiModel.cs │ │ │ └── HelpPage.css │ ├── bin │ │ ├── Owin.dll │ │ ├── WebAPI.dll │ │ ├── WebAPI.pdb │ │ ├── WebGrease.dll │ │ ├── Antlr3.Runtime.dll │ │ ├── Antlr3.Runtime.pdb │ │ ├── Microsoft.Owin.dll │ │ ├── System.Web.Mvc.dll │ │ ├── EntityFramework.dll │ │ ├── Newtonsoft.Json.dll │ │ ├── System.Web.Cors.dll │ │ ├── System.Web.Http.dll │ │ ├── System.Web.Razor.dll │ │ ├── Microsoft.Owin.Cors.dll │ │ ├── System.Web.Helpers.dll │ │ ├── System.Web.WebPages.dll │ │ ├── System.Web.Http.Cors.dll │ │ ├── Microsoft.Owin.Security.dll │ │ ├── System.Web.Http.WebHost.dll │ │ ├── System.Web.Optimization.dll │ │ ├── EntityFramework.SqlServer.dll │ │ ├── System.Net.Http.Formatting.dll │ │ ├── System.Web.WebPages.Razor.dll │ │ ├── Microsoft.Owin.Host.SystemWeb.dll │ │ ├── Microsoft.Owin.Security.OAuth.dll │ │ ├── Microsoft.Web.Infrastructure.dll │ │ ├── Microsoft.AspNet.Identity.Core.dll │ │ ├── Microsoft.AspNet.Identity.Owin.dll │ │ ├── Microsoft.Owin.Security.Cookies.dll │ │ ├── System.Web.WebPages.Deployment.dll │ │ └── Microsoft.AspNet.Identity.EntityFramework.dll │ ├── favicon.ico │ ├── Scripts │ │ └── _references.js │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── App_Start │ │ ├── FilterConfig.cs │ │ ├── RouteConfig.cs │ │ ├── WebApiConfig.cs │ │ └── BundleConfig.cs │ ├── Controllers │ │ ├── HomeController.cs │ │ ├── ValuesController.cs │ │ └── AccountController.cs │ ├── Models │ │ ├── AccountModel.cs │ │ └── IdentityModels.cs │ ├── Migrations │ │ ├── 201801311545174_ChangedDefaultColumnNames.cs │ │ ├── 201801311530466_InitailDB.Designer.cs │ │ ├── 201801311540510_ChangedDefaultTableNames.Designer.cs │ │ ├── 201801311545174_ChangedDefaultColumnNames.Designer.cs │ │ ├── Configuration.cs │ │ └── 201801311540510_ChangedDefaultTableNames.cs │ ├── Global.asax.cs │ ├── Content │ │ └── Site.css │ ├── Startup.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── WebAPI.csproj.user │ ├── ApplicationOAuthProvider.cs │ └── packages.config ├── WebAPI.v12.suo ├── packages │ ├── repositories.config │ ├── Owin.1.0 │ │ ├── Owin.1.0.nupkg │ │ ├── lib │ │ │ └── net40 │ │ │ │ └── Owin.dll │ │ └── Owin.1.0.nuspec │ ├── WebGrease.1.5.2 │ │ ├── tools │ │ │ └── WG.exe │ │ ├── lib │ │ │ └── WebGrease.dll │ │ ├── WebGrease.1.5.2.nupkg │ │ └── WebGrease.1.5.2.nuspec │ ├── Microsoft.AspNet.WebApi.HelpPage.5.0.0 │ │ ├── content │ │ │ └── Areas │ │ │ │ └── HelpPage │ │ │ │ ├── Views │ │ │ │ ├── Help │ │ │ │ │ ├── DisplayTemplates │ │ │ │ │ │ ├── ImageSample.cshtml.pp │ │ │ │ │ │ ├── TextSample.cshtml.pp │ │ │ │ │ │ ├── InvalidSample.cshtml.pp │ │ │ │ │ │ ├── Samples.cshtml.pp │ │ │ │ │ │ ├── ApiGroup.cshtml.pp │ │ │ │ │ │ ├── HelpPageApiModel.cshtml.pp │ │ │ │ │ │ └── Parameters.cshtml.pp │ │ │ │ │ ├── Api.cshtml.pp │ │ │ │ │ └── Index.cshtml.pp │ │ │ │ ├── _ViewStart.cshtml.pp │ │ │ │ └── Shared │ │ │ │ │ └── _Layout.cshtml.pp │ │ │ │ ├── SampleGeneration │ │ │ │ ├── SampleDirection.cs.pp │ │ │ │ ├── TextSample.cs.pp │ │ │ │ ├── InvalidSample.cs.pp │ │ │ │ └── ImageSample.cs.pp │ │ │ │ ├── HelpPageAreaRegistration.cs.pp │ │ │ │ ├── Controllers │ │ │ │ └── HelpController.cs.pp │ │ │ │ ├── ApiDescriptionExtensions.cs.pp │ │ │ │ ├── Models │ │ │ │ └── HelpPageApiModel.cs.pp │ │ │ │ └── HelpPage.css.pp │ │ ├── Microsoft.AspNet.WebApi.HelpPage.5.0.0.nupkg │ │ └── Microsoft.AspNet.WebApi.HelpPage.5.0.0.nuspec │ ├── Respond.1.2.0 │ │ ├── Respond.1.2.0.nupkg │ │ └── Respond.1.2.0.nuspec │ ├── jQuery.1.10.2 │ │ ├── jQuery.1.10.2.nupkg │ │ ├── jQuery.1.10.2.nuspec │ │ └── Tools │ │ │ ├── install.ps1 │ │ │ └── uninstall.ps1 │ ├── Modernizr.2.6.2 │ │ ├── Modernizr.2.6.2.nupkg │ │ ├── Tools │ │ │ ├── uninstall.ps1 │ │ │ ├── install.ps1 │ │ │ └── common.ps1 │ │ └── Modernizr.2.6.2.nuspec │ ├── bootstrap.3.0.0 │ │ ├── bootstrap.3.0.0.nupkg │ │ ├── content │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ └── bootstrap.3.0.0.nuspec │ ├── Antlr.3.4.1.9004 │ │ ├── Antlr.3.4.1.9004.nupkg │ │ ├── lib │ │ │ ├── Antlr3.Runtime.dll │ │ │ └── Antlr3.Runtime.pdb │ │ └── Antlr.3.4.1.9004.nuspec │ ├── EntityFramework.6.1.3 │ │ ├── tools │ │ │ ├── migrate.exe │ │ │ ├── EntityFramework.psd1 │ │ │ ├── EntityFramework.PowerShell.dll │ │ │ ├── EntityFramework.PowerShell.Utility.dll │ │ │ └── about_EntityFramework.help.txt │ │ ├── EntityFramework.6.1.3.nupkg │ │ ├── lib │ │ │ ├── net40 │ │ │ │ ├── EntityFramework.dll │ │ │ │ └── EntityFramework.SqlServer.dll │ │ │ └── net45 │ │ │ │ ├── EntityFramework.dll │ │ │ │ └── EntityFramework.SqlServer.dll │ │ ├── content │ │ │ ├── App.config.transform │ │ │ └── Web.config.transform │ │ └── EntityFramework.6.1.3.nuspec │ ├── Microsoft.Owin.3.1.0 │ │ ├── Microsoft.Owin.3.1.0.nupkg │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── Microsoft.Owin.dll │ │ └── Microsoft.Owin.3.1.0.nuspec │ ├── Newtonsoft.Json.6.0.8 │ │ ├── Newtonsoft.Json.6.0.8.nupkg │ │ ├── lib │ │ │ ├── net20 │ │ │ │ └── Newtonsoft.Json.dll │ │ │ ├── net35 │ │ │ │ └── Newtonsoft.Json.dll │ │ │ ├── net40 │ │ │ │ └── Newtonsoft.Json.dll │ │ │ ├── net45 │ │ │ │ └── Newtonsoft.Json.dll │ │ │ ├── netcore45 │ │ │ │ └── Newtonsoft.Json.dll │ │ │ ├── portable-net40+sl5+wp80+win8+wpa81 │ │ │ │ └── Newtonsoft.Json.dll │ │ │ └── portable-net45+wp80+win8+wpa81+aspnetcore50 │ │ │ │ └── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.6.0.8.nuspec │ ├── Microsoft.AspNet.Mvc.5.0.0 │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── System.Web.Mvc.dll │ │ ├── Microsoft.AspNet.Mvc.5.0.0.nupkg │ │ └── Microsoft.AspNet.Mvc.5.0.0.nuspec │ ├── Microsoft.AspNet.Cors.5.2.3 │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── System.Web.Cors.dll │ │ ├── Microsoft.AspNet.Cors.5.2.3.nupkg │ │ └── Microsoft.AspNet.Cors.5.2.3.nuspec │ ├── Microsoft.Owin.Cors.3.1.0 │ │ ├── Microsoft.Owin.Cors.3.1.0.nupkg │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── Microsoft.Owin.Cors.dll │ │ └── Microsoft.Owin.Cors.3.1.0.nuspec │ ├── Microsoft.AspNet.Razor.3.0.0 │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── System.Web.Razor.dll │ │ ├── Microsoft.AspNet.Razor.3.0.0.nupkg │ │ └── Microsoft.AspNet.Razor.3.0.0.nuspec │ ├── Microsoft.AspNet.WebApi.5.0.0 │ │ ├── Microsoft.AspNet.WebApi.5.0.0.nupkg │ │ └── Microsoft.AspNet.WebApi.5.0.0.nuspec │ ├── Microsoft.AspNet.WebApi.Core.5.2.3 │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── System.Web.Http.dll │ │ ├── Microsoft.AspNet.WebApi.Core.5.2.3.nupkg │ │ ├── Content │ │ │ └── web.config.transform │ │ └── Microsoft.AspNet.WebApi.Core.5.2.3.nuspec │ ├── Microsoft.AspNet.WebPages.3.0.0 │ │ ├── lib │ │ │ └── net45 │ │ │ │ ├── System.Web.Helpers.dll │ │ │ │ ├── System.Web.WebPages.dll │ │ │ │ ├── System.Web.WebPages.Razor.dll │ │ │ │ └── System.Web.WebPages.Deployment.dll │ │ ├── Microsoft.AspNet.WebPages.3.0.0.nupkg │ │ └── Microsoft.AspNet.WebPages.3.0.0.nuspec │ ├── Microsoft.Owin.Security.2.1.0 │ │ ├── Microsoft.Owin.Security.2.1.0.nupkg │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── Microsoft.Owin.Security.dll │ │ └── Microsoft.Owin.Security.2.1.0.nuspec │ ├── Microsoft.AspNet.WebApi.Cors.5.2.3 │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── System.Web.Http.Cors.dll │ │ ├── Microsoft.AspNet.WebApi.Cors.5.2.3.nupkg │ │ └── Microsoft.AspNet.WebApi.Cors.5.2.3.nuspec │ ├── Microsoft.AspNet.WebApi.WebHost.5.2.3 │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── System.Web.Http.WebHost.dll │ │ ├── Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg │ │ └── Microsoft.AspNet.WebApi.WebHost.5.2.3.nuspec │ ├── Microsoft.AspNet.Web.Optimization.1.1.1 │ │ ├── lib │ │ │ └── net40 │ │ │ │ └── System.Web.Optimization.dll │ │ ├── Microsoft.AspNet.Web.Optimization.1.1.1.nupkg │ │ └── Microsoft.AspNet.Web.Optimization.1.1.1.nuspec │ ├── Microsoft.AspNet.WebApi.Client.5.2.3 │ │ ├── lib │ │ │ ├── net45 │ │ │ │ └── System.Net.Http.Formatting.dll │ │ │ └── portable-wp8+netcore45+net45+wp81+wpa81 │ │ │ │ └── System.Net.Http.Formatting.dll │ │ ├── Microsoft.AspNet.WebApi.Client.5.2.3.nupkg │ │ └── Microsoft.AspNet.WebApi.Client.5.2.3.nuspec │ ├── Microsoft.Owin.Host.SystemWeb.3.1.0 │ │ ├── Microsoft.Owin.Host.SystemWeb.3.1.0.nupkg │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── Microsoft.Owin.Host.SystemWeb.dll │ │ └── Microsoft.Owin.Host.SystemWeb.3.1.0.nuspec │ ├── Microsoft.Owin.Security.OAuth.2.1.0 │ │ ├── Microsoft.Owin.Security.OAuth.2.1.0.nupkg │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── Microsoft.Owin.Security.OAuth.dll │ │ └── Microsoft.Owin.Security.OAuth.2.1.0.nuspec │ ├── Microsoft.AspNet.Identity.Core.2.2.1 │ │ ├── Microsoft.AspNet.Identity.Core.2.2.1.nupkg │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── Microsoft.AspNet.Identity.Core.dll │ │ └── Microsoft.AspNet.Identity.Core.2.2.1.nuspec │ ├── Microsoft.AspNet.Identity.Owin.2.2.1 │ │ ├── Microsoft.AspNet.Identity.Owin.2.2.1.nupkg │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── Microsoft.AspNet.Identity.Owin.dll │ │ └── Microsoft.AspNet.Identity.Owin.2.2.1.nuspec │ ├── Microsoft.Web.Infrastructure.1.0.0.0 │ │ ├── Microsoft.Web.Infrastructure.1.0.0.0.nupkg │ │ ├── lib │ │ │ └── net40 │ │ │ │ └── Microsoft.Web.Infrastructure.dll │ │ └── Microsoft.Web.Infrastructure.1.0.0.0.nuspec │ ├── Microsoft.Owin.Security.Cookies.2.1.0 │ │ ├── Microsoft.Owin.Security.Cookies.2.1.0.nupkg │ │ ├── lib │ │ │ └── net45 │ │ │ │ └── Microsoft.Owin.Security.Cookies.dll │ │ └── Microsoft.Owin.Security.Cookies.2.1.0.nuspec │ └── Microsoft.AspNet.Identity.EntityFramework.2.2.1 │ │ ├── Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg │ │ ├── lib │ │ └── net45 │ │ │ └── Microsoft.AspNet.Identity.EntityFramework.dll │ │ └── Microsoft.AspNet.Identity.EntityFramework.2.2.1.nuspec └── WebAPI.sln ├── Structure of Angular Project.txt └── README.md /Angular5/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular5/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular5/src/app/home/home.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular5/src/app/user/user.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular5/src/app/user/sign-in/sign-in.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular5/src/app/user/sign-up/sign-up.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Angular5/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /Angular5/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="WebAPI.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Angular5/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /WebAPI/WebAPI.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI.v12.suo -------------------------------------------------------------------------------- /WebAPI/WebAPI/Areas/HelpPage/Views/Help/DisplayTemplates/ImageSample.cshtml: -------------------------------------------------------------------------------- 1 | @using WebAPI.Areas.HelpPage 2 | @model ImageSample 3 | 4 | -------------------------------------------------------------------------------- /WebAPI/packages/repositories.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Angular5/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/Angular5/src/favicon.ico -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Owin.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/favicon.ico -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/WebAPI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/WebAPI.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/WebAPI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/WebAPI.pdb -------------------------------------------------------------------------------- /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/bin/WebGrease.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/WebGrease.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/Scripts/_references.js -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Antlr3.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Antlr3.Runtime.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Antlr3.Runtime.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Antlr3.Runtime.pdb -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.Owin.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.Mvc.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/obj/Debug/WebAPI.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/obj/Debug/WebAPI.pdb -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.Cors.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.Http.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.Razor.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.Owin.Cors.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.Helpers.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.WebPages.dll -------------------------------------------------------------------------------- /WebAPI/packages/Owin.1.0/Owin.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Owin.1.0/Owin.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Http.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.Http.Cors.dll -------------------------------------------------------------------------------- /WebAPI/packages/Owin.1.0/lib/net40/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Owin.1.0/lib/net40/Owin.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Http.WebHost.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.Http.WebHost.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.Optimization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.Optimization.dll -------------------------------------------------------------------------------- /WebAPI/packages/WebGrease.1.5.2/tools/WG.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/WebGrease.1.5.2/tools/WG.exe -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /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/bin/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /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/Respond.1.2.0/Respond.1.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Respond.1.2.0/Respond.1.2.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/WebGrease.1.5.2/lib/WebGrease.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/WebGrease.1.5.2/lib/WebGrease.dll -------------------------------------------------------------------------------- /WebAPI/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/jQuery.1.10.2/jQuery.1.10.2.nupkg -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/bin/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebAPI/WebAPI/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebAPI/WebAPI/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WebAPI/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Modernizr.2.6.2/Modernizr.2.6.2.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/WebGrease.1.5.2/WebGrease.1.5.2.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/bootstrap.3.0.0/bootstrap.3.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Antlr.3.4.1.9004/Antlr.3.4.1.9004.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Antlr.3.4.1.9004/lib/Antlr3.Runtime.pdb -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/tools/migrate.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/tools/migrate.exe -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.InitailDB.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.InitailDB.resources -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/obj/Debug/WebAPI.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /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/WebAPI/bin/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/bin/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.3.1.0/Microsoft.Owin.3.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.3.1.0/Microsoft.Owin.3.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/EntityFramework.6.1.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.psd1 -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.3.1.0/lib/net45/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.3.1.0/lib/net45/Microsoft.Owin.dll -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/Newtonsoft.Json.6.0.8.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Newtonsoft.Json.6.0.8/Newtonsoft.Json.6.0.8.nupkg -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/obj/Debug/WebAPI.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.dll -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/lib/net45/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/lib/net45/System.Web.Mvc.dll -------------------------------------------------------------------------------- /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/lib/netcore45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/netcore45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/lib/net45/System.Web.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/lib/net45/System.Web.Cors.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Cors.3.1.0/Microsoft.Owin.Cors.3.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Cors.3.1.0/Microsoft.Owin.Cors.3.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.ChangedDefaultTableNames.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.ChangedDefaultTableNames.resources -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/Microsoft.AspNet.Mvc.5.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Mvc.5.0.0/Microsoft.AspNet.Mvc.5.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/lib/net45/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/lib/net45/System.Web.Razor.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Cors.3.1.0/lib/net45/Microsoft.Owin.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Cors.3.1.0/lib/net45/Microsoft.Owin.Cors.dll -------------------------------------------------------------------------------- /WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.ChangedDefaultColumnNames.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/WebAPI/obj/Debug/WebAPI.Migrations.ChangedDefaultColumnNames.resources -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/lib/net40/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /WebAPI/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/lib/net45/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/Microsoft.AspNet.Cors.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Cors.5.2.3/Microsoft.AspNet.Cors.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/Microsoft.AspNet.Razor.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Razor.3.0.0/Microsoft.AspNet.Razor.3.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.5.0.0/Microsoft.AspNet.WebApi.5.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.5.0.0/Microsoft.AspNet.WebApi.5.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/bootstrap.3.0.0/content/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/tools/EntityFramework.PowerShell.Utility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/EntityFramework.6.1.3/tools/EntityFramework.PowerShell.Utility.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.2.1.0/lib/net45/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Security.2.1.0/lib/net45/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Cors.5.2.3/lib/net45/System.Web.Http.Cors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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/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.WebPages.3.0.0/Microsoft.AspNet.WebPages.3.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/Microsoft.AspNet.WebPages.3.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.Core.5.2.3/Microsoft.AspNet.WebApi.Core.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Cors.5.2.3/Microsoft.AspNet.WebApi.Cors.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.Cors.5.2.3/Microsoft.AspNet.WebApi.Cors.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/lib/net45/System.Web.Http.WebHost.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/lib/net45/System.Web.Http.WebHost.dll -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/lib/net40/System.Web.Optimization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/lib/net40/System.Web.Optimization.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebPages.3.0.0/lib/net45/System.Web.WebPages.Deployment.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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Host.SystemWeb.3.1.0/Microsoft.Owin.Host.SystemWeb.3.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/Microsoft.AspNet.WebApi.Client.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Host.SystemWeb.3.1.0/lib/net45/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Host.SystemWeb.3.1.0/lib/net45/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.OAuth.2.1.0/lib/net45/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/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/lib/net40/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/Microsoft.AspNet.WebApi.WebHost.5.2.3.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/Microsoft.AspNet.Web.Optimization.1.1.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Web.Optimization.1.1.1/Microsoft.AspNet.Web.Optimization.1.1.1.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/Microsoft.AspNet.WebApi.HelpPage.5.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.HelpPage.5.0.0/Microsoft.AspNet.WebApi.HelpPage.5.0.0.nupkg -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.Owin.Security.Cookies.2.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /WebAPI/packages/Newtonsoft.Json.6.0.8/lib/portable-net45+wp80+win8+wpa81+aspnetcore50/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Newtonsoft.Json.6.0.8/lib/portable-net45+wp80+win8+wpa81+aspnetcore50/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewBag.Title 7 | @RenderSection("scripts", required: false) 8 | 9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /WebAPI/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/Microsoft.AspNet.Identity.EntityFramework.2.2.1.nupkg -------------------------------------------------------------------------------- /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/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.Identity.EntityFramework.2.2.1/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/master/WebAPI/packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/portable-wp8+netcore45+net45+wp81+wpa81/System.Net.Http.Formatting.dll -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/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 | } -------------------------------------------------------------------------------- /Structure of Angular Project.txt: -------------------------------------------------------------------------------- 1 | ● src 2 | +---● app 3 | | +--● user 4 | | |--user.component.ts|.html|.css 5 | | +--● sign-in 6 | | | |--sign-in.component.ts|.html|.css 7 | | | 8 | | +--● sign-up 9 | | | |--sign-up.component.ts|.html|.css 10 | | | 11 | | +--● shared 12 | | |--user.service.ts 13 | | |--user.model.ts 14 | | 15 | +---● home 16 | | |--home.component.ts|.html|.css 17 | | 18 | |---● routes.ts 19 | | 20 | +---● auth 21 | | |--auth.guard.ts 22 | | |--auth.interceptor.ts -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 5 | @Injectable() 6 | export class AuthGuard implements CanActivate { 7 | constructor(private router : Router){} 8 | canActivate( 9 | next: ActivatedRouteSnapshot, 10 | state: RouterStateSnapshot): boolean { 11 | if (localStorage.getItem('userToken') != null) 12 | return true; 13 | this.router.navigate(['/login']); 14 | return false; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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-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/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 | 22 | Logout() { 23 | localStorage.removeItem('userToken'); 24 | this.router.navigate(['/login']); 25 | } 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /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/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Angular5 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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 | 8 | export const appRoutes: Routes = [ 9 | { path: 'home', component: HomeComponent,canActivate:[AuthGuard] }, 10 | { 11 | path: 'signup', component: UserComponent, 12 | children: [{ path: '', component: SignUpComponent }] 13 | }, 14 | { 15 | path: 'login', component: UserComponent, 16 | children: [{ path: '', component: SignInComponent }] 17 | }, 18 | { path : '', redirectTo:'/login', pathMatch : 'full'} 19 | 20 | ]; -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Angular5/src/app/home/home.component.html: -------------------------------------------------------------------------------- 1 | 12 |
13 |
14 |
15 |
16 | Username :{{userClaims.UserName}} 17 |
18 | Email : {{userClaims.Email}} 19 |
20 | Full Name : {{userClaims.FirstName}} {{userClaims.LastName}} 21 |
22 | Logged On : {{userClaims.LoggedOn}} 23 |
24 |
25 |
26 |
-------------------------------------------------------------------------------- /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/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/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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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 | -------------------------------------------------------------------------------- /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 | this.router.navigate(['/home']); 22 | }, 23 | (err : HttpErrorResponse)=>{ 24 | this.isLoginError = true; 25 | }); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /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/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/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/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 | -------------------------------------------------------------------------------- /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 |
-------------------------------------------------------------------------------- /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.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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/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/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/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/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.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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.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/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/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/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/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 | } -------------------------------------------------------------------------------- /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) { 14 | const body: User = { 15 | UserName: user.UserName, 16 | Password: user.Password, 17 | Email: user.Email, 18 | FirstName: user.FirstName, 19 | LastName: user.LastName 20 | } 21 | var reqHeader = new HttpHeaders({'No-Auth':'True'}); 22 | return this.http.post(this.rootUrl + '/api/User/Register', body,{headers : reqHeader}); 23 | } 24 | 25 | userAuthentication(userName, password) { 26 | var data = "username=" + userName + "&password=" + password + "&grant_type=password"; 27 | var reqHeader = new HttpHeaders({ 'Content-Type': 'application/x-www-urlencoded','No-Auth':'True' }); 28 | return this.http.post(this.rootUrl + '/token', data, { headers: reqHeader }); 29 | } 30 | 31 | getUserClaims(){ 32 | return this.http.get(this.rootUrl+'/api/GetUserClaims'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | } 28 | ); 29 | } 30 | else { 31 | this.router.navigateByUrl('/login'); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /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 | 16 | constructor(private userService: UserService, private toastr: ToastrService) { } 17 | 18 | ngOnInit() { 19 | this.resetForm(); 20 | } 21 | 22 | resetForm(form?: NgForm) { 23 | if (form != null) 24 | form.reset(); 25 | this.user = { 26 | UserName: '', 27 | Password: '', 28 | Email: '', 29 | FirstName: '', 30 | LastName: '' 31 | } 32 | } 33 | 34 | OnSubmit(form: NgForm) { 35 | this.userService.registerUser(form.value) 36 | .subscribe((data: any) => { 37 | if (data.Succeeded == true) { 38 | this.resetForm(form); 39 | this.toastr.success('User registration successful'); 40 | } 41 | else 42 | this.toastr.error(data.Errors[0]); 43 | }); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /WebAPI/WebAPI/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /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/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/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/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /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/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/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/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.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.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/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/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 | -------------------------------------------------------------------------------- /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/.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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 19 | 20 | @NgModule({ 21 | declarations: [ 22 | AppComponent, 23 | SignUpComponent, 24 | UserComponent, 25 | SignInComponent, 26 | HomeComponent 27 | ], 28 | imports: [ 29 | BrowserModule, 30 | FormsModule, 31 | HttpClientModule, 32 | ToastrModule.forRoot(), 33 | BrowserAnimationsModule, 34 | RouterModule.forRoot(appRoutes) 35 | ], 36 | providers: [UserService,AuthGuard, 37 | , 38 | { 39 | provide : HTTP_INTERCEPTORS, 40 | useClass : AuthInterceptor, 41 | multi : true 42 | }], 43 | bootstrap: [AppComponent] 44 | }) 45 | export class AppModule { } 46 | -------------------------------------------------------------------------------- /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.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/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 | -------------------------------------------------------------------------------- /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 |
-------------------------------------------------------------------------------- /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/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/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/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/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/ApplicationOAuthProvider.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity; 2 | using Microsoft.AspNet.Identity.EntityFramework; 3 | using Microsoft.Owin.Security.OAuth; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Security.Claims; 8 | using System.Threading.Tasks; 9 | using System.Web; 10 | using WebAPI.Models; 11 | 12 | namespace WebAPI 13 | { 14 | public class ApplicationOAuthProvider : OAuthAuthorizationServerProvider 15 | { 16 | 17 | public override async Task ValidateClientAuthentication(OAuthValidateClientAuthenticationContext context) 18 | { 19 | context.Validated(); 20 | } 21 | 22 | public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context) 23 | { 24 | var userStore = new UserStore(new ApplicationDbContext()); 25 | var manager = new UserManager(userStore); 26 | var user = await manager.FindAsync(context.UserName,context.Password); 27 | if (user != null) { 28 | var identity = new ClaimsIdentity(context.Options.AuthenticationType); 29 | identity.AddClaim(new Claim("Username", user.UserName)); 30 | identity.AddClaim(new Claim("Email", user.Email)); 31 | identity.AddClaim(new Claim("FirstName", user.FirstName)); 32 | identity.AddClaim(new Claim("LastName", user.LastName)); 33 | identity.AddClaim(new Claim("LoggedOn", DateTime.Now.ToString())); 34 | context.Validated(identity); 35 | } 36 | else 37 | return; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /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/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/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/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/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/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/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/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/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/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/WebAPI/Controllers/AccountController.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.Security.Claims; 9 | using System.Web.Http; 10 | using WebAPI.Models; 11 | 12 | namespace WebAPI.Controllers 13 | { 14 | public class AccountController : ApiController 15 | { 16 | [Route("api/User/Register")] 17 | [HttpPost] 18 | [AllowAnonymous] 19 | public IdentityResult Register(AccountModel model) 20 | { 21 | var userStore = new UserStore(new ApplicationDbContext()); 22 | var manager = new UserManager(userStore); 23 | var user = new ApplicationUser() { UserName = model.UserName, Email = model.Email }; 24 | user.FirstName = model.FirstName; 25 | user.LastName = model.LastName; 26 | manager.PasswordValidator = new PasswordValidator 27 | { 28 | RequiredLength = 3 29 | }; 30 | IdentityResult result = manager.Create(user, model.Password); 31 | return result; 32 | } 33 | 34 | [HttpGet] 35 | [Route("api/GetUserClaims")] 36 | public AccountModel GetUserClaims() 37 | { 38 | var identityClaims = (ClaimsIdentity)User.Identity; 39 | IEnumerable claims = identityClaims.Claims; 40 | AccountModel model = new AccountModel() 41 | { 42 | UserName = identityClaims.FindFirst("Username").Value, 43 | Email = identityClaims.FindFirst("Email").Value, 44 | FirstName = identityClaims.FindFirst("FirstName").Value, 45 | LastName = identityClaims.FindFirst("LastName").Value, 46 | LoggedOn = identityClaims.FindFirst("LoggedOn").Value 47 | }; 48 | return model; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /Angular5/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/ 22 | // import 'core-js/es6/symbol'; 23 | // import 'core-js/es6/object'; 24 | // import 'core-js/es6/function'; 25 | // import 'core-js/es6/parse-int'; 26 | // import 'core-js/es6/parse-float'; 27 | // import 'core-js/es6/number'; 28 | // import 'core-js/es6/math'; 29 | // import 'core-js/es6/string'; 30 | // import 'core-js/es6/date'; 31 | // import 'core-js/es6/array'; 32 | // import 'core-js/es6/regexp'; 33 | // import 'core-js/es6/map'; 34 | // import 'core-js/es6/weak-map'; 35 | // import 'core-js/es6/set'; 36 | 37 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 38 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 39 | 40 | /** IE10 and IE11 requires the following for the Reflect API. */ 41 | // import 'core-js/es6/reflect'; 42 | 43 | 44 | /** Evergreen browsers require these. **/ 45 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. 46 | import 'core-js/es7/reflect'; 47 | 48 | 49 | /** 50 | * Required to support Web Animations `@angular/platform-browser/animations`. 51 | * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation 52 | **/ 53 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 54 | 55 | 56 | 57 | /*************************************************************************************************** 58 | * Zone JS is required by default for Angular itself. 59 | */ 60 | import 'zone.js/dist/zone'; // Included with Angular CLI. 61 | 62 | 63 | 64 | /*************************************************************************************************** 65 | * APPLICATION IMPORTS 66 | */ 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular 5: Login-Logout in Web API using Token Based Authentication. 2 | This is an Angular 5 Application to demonstrate how implementation of Token Based Authentication in Angular 5 with Web API. 3 | 4 | Points discussed : 5 | - How to create login form in angular 5 6 | - Implemented Token Based Authentication in Web API 7 | - How to make token request from angular 5 8 | - Configure Routing in Angular 5 9 | - Logout in angular 5 10 | - How to use Routing Guard in angular 5 11 | - Use of HttpInterceptors in angular 5 12 | 13 | 14 | ## Get the Code 15 | 16 | ``` 17 | $ git clone https://github.com/CodAffection/Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication.git 18 | $ cd Angular-5-Login-and-Logout-in-Web-API-Using-Token-Based-Authentication/Angular5 19 | $ npm install 20 | //run the app 21 | $ ng serve 22 | //update Web API DB connection string 23 | ``` 24 | 25 | ## How it works ? 26 | 27 | :scroll: Article on this topic 28 | Url : https://goo.gl/WPvUSD 29 | 30 | :tv: Video tutorial on this same topic 31 | Url : https://youtu.be/e8BlURn6SFk 32 | 33 | Video Tutorial for Angular 5 CRUD Using Firebase 36 | 37 | 38 | | :bar_chart: | List of Tutorials | | :moneybag: | Support Us | 39 | |--------------------------:|:---------------------|---|---------------------:|:-------------------------------------| 40 | | Angular |http://bit.ly/2KQN9xF | |Paypal | https://goo.gl/bPcyXW | 41 | | Asp.Net Core |http://bit.ly/30fPDMg | |Amazon Affiliate | https://geni.us/JDzpE | 42 | | React |http://bit.ly/325temF | | 43 | | Python |http://bit.ly/2ws4utg | | :point_right: | Follow Us | 44 | | Node.js |https://goo.gl/viJcFs | |Website |http://www.codaffection.com | 45 | | Asp.Net MVC |https://goo.gl/gvjUJ7 | |YouTube |https://www.youtube.com/codaffection | 46 | | Flutter |https://bit.ly/3ggmmJz| |Facebook |https://www.facebook.com/codaffection | 47 | | Web API |https://goo.gl/itVayJ | |Twitter |https://twitter.com/CodAffection | 48 | | MEAN Stack |https://goo.gl/YJPPAH | | 49 | | C# Tutorial |https://goo.gl/s1zJxo | | 50 | | Asp.Net WebForm |https://goo.gl/GXC2aJ | | 51 | | C# WinForm |https://goo.gl/vHS9Hd | | 52 | | MS SQL |https://goo.gl/MLYS9e | | 53 | | Crystal Report |https://goo.gl/5Vou7t | | 54 | | CG Exercises in C Program |https://goo.gl/qEWJCs | | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /WebAPI/packages/Modernizr.2.6.2/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 2 | try { 3 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 4 | } 5 | catch { 6 | # _references.js file not found 7 | return 8 | } 9 | 10 | if ($referencesFileProjectItem -eq $null) { 11 | # _references.js file not found 12 | return 13 | } 14 | 15 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 16 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 17 | 18 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 19 | # File has no existing matching reference line 20 | # Add the full reference line to the beginning of the file 21 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 22 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 23 | } 24 | else { 25 | # Loop through file and replace old file name with new file name 26 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 27 | } 28 | 29 | # Copy over the new _references.js file 30 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 31 | Remove-Item $referencesTempFilePath -Force 32 | } 33 | 34 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 35 | try { 36 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 37 | } 38 | catch { 39 | # _references.js file not found 40 | return 41 | } 42 | 43 | if ($referencesFileProjectItem -eq $null) { 44 | return 45 | } 46 | 47 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 48 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 49 | 50 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 51 | # Delete the line referencing the file 52 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 53 | 54 | # Copy over the new _references.js file 55 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 56 | Remove-Item $referencesTempFilePath -Force 57 | } 58 | } 59 | 60 | # Extract the version number from the file in the package's content\scripts folder 61 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 62 | $modernizrFileName = Join-Path $packageScriptsFolder "modernizr-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 63 | $modernizrFileNameRegEx = "modernizr-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 64 | $modernizrFileName -match $modernizrFileNameRegEx 65 | $ver = $matches[1] 66 | 67 | # Get the project item for the scripts folder 68 | try { 69 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 70 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 71 | } 72 | catch { 73 | # No Scripts folder 74 | Write-Host "No scripts folder found" 75 | } --------------------------------------------------------------------------------