├── IdentityMicroservice ├── Views │ ├── _ViewStart.cshtml │ ├── _ViewImports.cshtml │ ├── Device │ │ ├── Success.cshtml │ │ ├── UserCodeCapture.cshtml │ │ └── UserCodeConfirmation.cshtml │ ├── Shared │ │ ├── _ValidationSummary.cshtml │ │ ├── Redirect.cshtml │ │ ├── _ScopeListItem.cshtml │ │ ├── Error.cshtml │ │ └── _Layout.cshtml │ ├── Account │ │ ├── Logout.cshtml │ │ ├── LoggedOut.cshtml │ │ └── Login.cshtml │ ├── Diagnostics │ │ └── Index.cshtml │ ├── Home │ │ └── Index.cshtml │ ├── Grants │ │ └── Index.cshtml │ └── Consent │ │ └── Index.cshtml ├── appsettings.json ├── AspIdUsers.db ├── wwwroot │ ├── js │ │ ├── signin-redirect.js │ │ └── signout-redirect.js │ ├── icon.jpg │ ├── icon.png │ ├── favicon.ico │ ├── lib │ │ ├── bootstrap │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── jquery-validation │ │ │ └── build │ │ │ └── release.js │ └── css │ │ ├── site.min.css │ │ ├── site.css │ │ └── site.less ├── Models │ └── ApplicationUser.cs ├── appsettings.Development.json ├── Quickstart │ ├── Account │ │ ├── LogoutInputModel.cs │ │ ├── RedirectViewModel.cs │ │ ├── LogoutViewModel.cs │ │ ├── ExternalProvider.cs │ │ ├── LoginInputModel.cs │ │ ├── LoggedOutViewModel.cs │ │ ├── LoginViewModel.cs │ │ └── AccountOptions.cs │ ├── Home │ │ ├── ErrorViewModel.cs │ │ └── HomeController.cs │ ├── Device │ │ ├── DeviceAuthorizationInputModel.cs │ │ ├── DeviceAuthorizationViewModel.cs │ │ └── DeviceController.cs │ ├── Consent │ │ ├── ConsentInputModel.cs │ │ ├── ScopeViewModel.cs │ │ ├── ProcessConsentResult.cs │ │ ├── ConsentViewModel.cs │ │ ├── ConsentOptions.cs │ │ └── ConsentController.cs │ ├── Extensions.cs │ ├── Grants │ │ ├── GrantsViewModel.cs │ │ └── GrantsController.cs │ ├── Diagnostics │ │ ├── DiagnosticsController.cs │ │ └── DiagnosticsViewModel.cs │ └── SecurityHeadersAttribute.cs ├── Properties │ └── launchSettings.json ├── Data │ ├── ApplicationDbContext.cs │ └── Migrations │ │ ├── ApplicationDbContextModelSnapshot.cs │ │ ├── 20180109192453_CreateIdentitySchema.Designer.cs │ │ └── 20180109192453_CreateIdentitySchema.cs ├── IdentityMicroservice.csproj ├── tempkey.rsa ├── Program.cs ├── Config.cs ├── Startup.cs ├── SeedData.cs └── updateUI.ps1 ├── CLientProjects ├── WebClient │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ ├── Privacy.cshtml │ │ │ └── Index.cshtml │ │ └── Shared │ │ │ ├── Error.cshtml │ │ │ ├── _CookieConsentPartial.cshtml │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ └── _Layout.cshtml │ ├── appsettings.json │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── js │ │ │ └── site.js │ │ ├── lib │ │ │ ├── jquery-validation-unobtrusive │ │ │ │ ├── LICENSE.txt │ │ │ │ └── jquery.validate.unobtrusive.min.js │ │ │ ├── jquery-validation │ │ │ │ └── LICENSE.md │ │ │ ├── bootstrap │ │ │ │ ├── LICENSE │ │ │ │ └── dist │ │ │ │ │ └── css │ │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ │ └── bootstrap-reboot.css │ │ │ └── jquery │ │ │ │ └── LICENSE.txt │ │ └── css │ │ │ └── site.css │ ├── appsettings.Development.json │ ├── Models │ │ └── ErrorViewModel.cs │ ├── Controllers │ │ ├── AccountController.cs │ │ └── HomeController.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── WebClient.csproj │ └── Startup.cs └── SPAClient │ ├── appsettings.json │ ├── appsettings.Development.json │ ├── SPAClient.csproj │ ├── wwwroot │ ├── callback.html │ ├── index.html │ └── app.js │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ └── Startup.cs ├── ApiResourceProjects └── TestApiResource │ ├── appsettings.json │ ├── appsettings.Development.json │ ├── Controllers │ ├── TestController.cs │ └── ValuesController.cs │ ├── TestApiResource.csproj │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ └── Startup.cs ├── LICENSE ├── IDService.sln └── .gitignore /IdentityMicroservice/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /CLientProjects/WebClient/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /IdentityMicroservice/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "" 4 | } 5 | } -------------------------------------------------------------------------------- /IdentityMicroservice/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using IdentityServer4.Quickstart.UI 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /CLientProjects/WebClient/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebClient 2 | @using WebClient.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /IdentityMicroservice/AspIdUsers.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/IdentityMicroservice/AspIdUsers.db -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/js/signin-redirect.js: -------------------------------------------------------------------------------- 1 | window.location.href = document.querySelector("meta[http-equiv=refresh]").getAttribute("data-url"); 2 | -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/IdentityMicroservice/wwwroot/icon.jpg -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/IdentityMicroservice/wwwroot/icon.png -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/IdentityMicroservice/wwwroot/favicon.ico -------------------------------------------------------------------------------- /CLientProjects/SPAClient/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /CLientProjects/WebClient/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /CLientProjects/WebClient/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/CLientProjects/WebClient/wwwroot/favicon.ico -------------------------------------------------------------------------------- /ApiResourceProjects/TestApiResource/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /IdentityMicroservice/Views/Device/Success.cshtml: -------------------------------------------------------------------------------- 1 |
Use this page to detail your site's privacy policy.
7 | -------------------------------------------------------------------------------- /CLientProjects/SPAClient/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /CLientProjects/WebClient/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/js/signout-redirect.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("load", function () { 2 | var a = document.querySelector("a.PostLogoutRedirectUri"); 3 | if (a) { 4 | window.location = a.href; 5 | } 6 | }); 7 | -------------------------------------------------------------------------------- /ApiResourceProjects/TestApiResource/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/IdentityMicroservice/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/IdentityMicroservice/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/IdentityMicroservice/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /IdentityMicroservice/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ferastaleb/ASP.NETIdentityWithIdentityServer4Sample/HEAD/IdentityMicroservice/wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /IdentityMicroservice/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /IdentityMicroservice/Quickstart/Account/LogoutInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | namespace IdentityServer4.Quickstart.UI 6 | { 7 | public class LogoutInputModel 8 | { 9 | public string LogoutId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /IdentityMicroservice/Quickstart/Account/RedirectViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | 6 | namespace IdentityServer4.Quickstart.UI 7 | { 8 | public class RedirectViewModel 9 | { 10 | public string RedirectUrl { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /IdentityMicroservice/Views/Device/UserCodeCapture.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Logging In ....
19 | 20 | -------------------------------------------------------------------------------- /CLientProjects/WebClient/Controllers/AccountController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace WebClient.Controllers 8 | { 9 | public class AccountController : Controller 10 | { 11 | 12 | // TODO : study more details about what happens here when signing out 13 | [HttpPost] 14 | public IActionResult Logout() 15 | { 16 | return SignOut("Cookies", "oidc"); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /IdentityMicroservice/Quickstart/Consent/ConsentInputModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System.Collections.Generic; 6 | 7 | namespace IdentityServer4.Quickstart.UI 8 | { 9 | public class ConsentInputModel 10 | { 11 | public string Button { get; set; } 12 | public IEnumerableWould you like to logout of IdentityServer?
11 | 19 |Learn about building Web apps with ASP.NET Core.
8 |
12 | Request ID: @Model.RequestId
13 |
18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |
20 |21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |
26 | -------------------------------------------------------------------------------- /IdentityMicroservice/Quickstart/Account/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved. 2 | // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. 3 | 4 | 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | 9 | namespace IdentityServer4.Quickstart.UI 10 | { 11 | public class LoginViewModel : LoginInputModel 12 | { 13 | public bool AllowRememberLogin { get; set; } = true; 14 | public bool EnableLocalLogin { get; set; } = true; 15 | 16 | public IEnumerable19 | IdentityServer publishes a 20 | discovery document 21 | where you can find metadata and links to all the endpoints, key material, etc. 22 |
23 |26 | Click here to manage your stored grants. 27 |
28 |33 | Here are links to the 34 | source code repository, 35 | and ready to use samples. 36 |
37 |22 | Please confirm that the authorization request quotes the code: "@Model.UserCode". 23 |
24 |