├── IdentityServerAspNetIdentity ├── Views │ ├── _ViewStart.cshtml │ ├── _ViewImports.cshtml │ ├── Device │ │ ├── Success.cshtml │ │ ├── UserCodeCapture.cshtml │ │ └── UserCodeConfirmation.cshtml │ ├── Account │ │ ├── AccessDenied.cshtml │ │ ├── Logout.cshtml │ │ ├── LoggedOut.cshtml │ │ └── Login.cshtml │ ├── Shared │ │ ├── _ValidationSummary.cshtml │ │ ├── Redirect.cshtml │ │ ├── _ScopeListItem.cshtml │ │ ├── Error.cshtml │ │ └── _Layout.cshtml │ ├── Diagnostics │ │ └── Index.cshtml │ ├── Home │ │ └── Index.cshtml │ ├── Grants │ │ └── Index.cshtml │ └── Consent │ │ └── Index.cshtml ├── AspIdUsers.db ├── appsettings.json ├── wwwroot │ ├── icon.jpg │ ├── icon.png │ ├── favicon.ico │ ├── js │ │ ├── signin-redirect.js │ │ └── signout-redirect.js │ ├── 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 ├── Quickstart │ ├── Account │ │ ├── LogoutInputModel.cs │ │ ├── RedirectViewModel.cs │ │ ├── LogoutViewModel.cs │ │ ├── ExternalProvider.cs │ │ ├── LoginInputModel.cs │ │ ├── LoggedOutViewModel.cs │ │ ├── LoginViewModel.cs │ │ ├── AccountOptions.cs │ │ └── ExternalController.cs │ ├── Device │ │ ├── DeviceAuthorizationInputModel.cs │ │ ├── DeviceAuthorizationViewModel.cs │ │ └── DeviceController.cs │ ├── Consent │ │ ├── ConsentInputModel.cs │ │ ├── ScopeViewModel.cs │ │ ├── ProcessConsentResult.cs │ │ ├── ConsentViewModel.cs │ │ ├── ConsentOptions.cs │ │ └── ConsentController.cs │ ├── Home │ │ ├── ErrorViewModel.cs │ │ └── HomeController.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 ├── IdentityServerAspNetIdentity.csproj ├── tempkey.rsa ├── Config.cs ├── Program.cs ├── Startup.cs ├── SeedData.cs └── updateUI.ps1 ├── BlazorId_App ├── wwwroot │ ├── favicon.ico │ └── css │ │ ├── open-iconic │ │ ├── font │ │ │ ├── fonts │ │ │ │ ├── open-iconic.eot │ │ │ │ ├── open-iconic.otf │ │ │ │ ├── open-iconic.ttf │ │ │ │ └── open-iconic.woff │ │ │ └── css │ │ │ │ └── open-iconic-bootstrap.min.css │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── FONT-LICENSE │ │ └── site.css ├── Pages │ ├── Index.razor │ ├── Counter.razor │ ├── Identity-Api.razor │ ├── Identity-App.razor │ ├── Error.razor │ └── _Host.cshtml ├── appsettings.json ├── appsettings.Development.json ├── Shared │ ├── MainLayout.razor │ ├── SurveyPrompt.razor │ └── NavMenu.razor ├── _Imports.razor ├── BlazorId_App.csproj ├── Properties │ └── launchSettings.json ├── App.razor ├── Program.cs ├── Data │ └── IdentityDataService.cs └── Startup.cs ├── Api ├── appsettings.json ├── Api.csproj ├── Program.cs ├── Properties │ └── launchSettings.json ├── Controllers │ └── IdentityController.cs └── Startup.cs ├── BlazorId_Shared ├── BlazorId_Shared.csproj └── Policies │ └── Policies.cs ├── BlazorId_App.sln ├── .gitattributes └── .gitignore /IdentityServerAspNetIdentity/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /BlazorId_App/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricklebyte/BlazorId_App/HEAD/BlazorId_App/wwwroot/favicon.ico -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/AspIdUsers.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricklebyte/BlazorId_App/HEAD/IdentityServerAspNetIdentity/AspIdUsers.db -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Data Source=AspIdUsers.db;" 4 | } 5 | } -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using IdentityServer4.Quickstart.UI 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/wwwroot/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricklebyte/BlazorId_App/HEAD/IdentityServerAspNetIdentity/wwwroot/icon.jpg -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/wwwroot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricklebyte/BlazorId_App/HEAD/IdentityServerAspNetIdentity/wwwroot/icon.png -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tricklebyte/BlazorId_App/HEAD/IdentityServerAspNetIdentity/wwwroot/favicon.ico -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/wwwroot/js/signin-redirect.js: -------------------------------------------------------------------------------- 1 | window.location.href = document.querySelector("meta[http-equiv=refresh]").getAttribute("data-url"); 2 | -------------------------------------------------------------------------------- /BlazorId_App/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 | 3 |
You do not have access to that resource.
8 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BlazorId_App/Pages/Counter.razor: -------------------------------------------------------------------------------- 1 | @page "/counter" 2 | 3 |Current count: @currentCount
6 | 7 | 8 | 9 | @code { 10 | private int currentCount = 0; 11 | 12 | private void IncrementCount() 13 | { 14 | currentCount++; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /BlazorId_App/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |8 | Please enter the code displayed on your device 9 |
10 | 14 |These are the user claims that were presented to the API
9 | 10 | 11 | @if (userClaimsJson == null) 12 | { 13 |Loading...
14 | } 15 | else 16 | { 17 |@userClaimsJson18 | } 19 | 20 | @code { 21 | private string userClaimsJson; 22 | 23 | protected override async Task OnInitializedAsync() 24 | { 25 | userClaimsJson = await IdentityService.GetAPIUserClaimsJson(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/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 IEnumerable
Would you like to logout of IdentityServer?
11 | 19 |These are the user claims that were presented to the Application
10 | 11 | 12 | @if (userClaimsJson == null) 13 | { 14 |Loading...
15 | } 16 | else 17 | { 18 |@userClaimsJson19 | } 20 | 21 | @code { 22 | private string userClaimsJson; 23 | 24 | protected override async Task OnInitializedAsync() 25 | { 26 | string claimsJson = 27 | userClaimsJson = await IdentityService.GetAPPUserClaimsJson(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/Views/Diagnostics/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model DiagnosticsViewModel 2 | 3 |
9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |
11 |12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |
-------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/Quickstart/Consent/ProcessConsentResult.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 ProcessConsentResult 8 | { 9 | public bool IsRedirect => RedirectUri != null; 10 | public string RedirectUri { get; set; } 11 | public string ClientId { get; set; } 12 | 13 | public bool ShowView => ViewModel != null; 14 | public ConsentViewModel ViewModel { get; set; } 15 | 16 | public bool HasValidationError => ValidationError != null; 17 | public string ValidationError { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /BlazorId_App/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:53108", 7 | "sslPort": 44321 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BlazorId_App": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /IdentityServerAspNetIdentity/Quickstart/Consent/ConsentViewModel.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 ConsentViewModel : ConsentInputModel 10 | { 11 | public string ClientName { get; set; } 12 | public string ClientUrl { get; set; } 13 | public string ClientLogoUrl { get; set; } 14 | public bool AllowRememberConsent { get; set; } 15 | 16 | public IEnumerableYou may want to try logging in (as someone with the necessary authorization).
8 |Sorry, there's nothing at this address.
14 |19 | 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 |