├── src ├── UI │ ├── styles │ │ ├── index.less │ │ └── global.less │ ├── Pages │ │ ├── Index.razor │ │ ├── Counter.razor │ │ └── FetchData.razor │ ├── _Imports.razor │ ├── Shared │ │ ├── SurveyPrompt.razor │ │ ├── LoginDisplay.razor │ │ ├── NavMenu.razor │ │ └── MainLayout.razor │ ├── gulpfile.js │ ├── wwwroot │ │ └── css │ │ │ └── site.css │ └── AntDesignTemplate.UI.csproj ├── IdentityServer │ ├── 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 │ ├── 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 │ │ └── css │ │ │ ├── site.min.css │ │ │ ├── site.css │ │ │ └── site.less │ ├── Properties │ │ └── launchSettings.json │ ├── 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 │ │ ├── Grants │ │ │ ├── GrantsViewModel.cs │ │ │ └── GrantsController.cs │ │ ├── Diagnostics │ │ │ ├── DiagnosticsController.cs │ │ │ └── DiagnosticsViewModel.cs │ │ ├── Extensions.cs │ │ ├── TestUsers.cs │ │ └── SecurityHeadersAttribute.cs │ ├── IdentityServer.csproj │ ├── tempkey.rsa │ ├── Config.cs │ ├── Startup.cs │ └── Program.cs ├── Server │ ├── app.db │ ├── Models │ │ └── ApplicationUser.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Pages │ │ ├── Shared │ │ │ └── _Layout.cshtml │ │ ├── Error.cshtml.cs │ │ └── Error.cshtml │ ├── Data │ │ ├── ApplicationDbContext.cs │ │ └── Migrations │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ ├── ApplicationDbContextModelSnapshot.cs │ │ │ └── 00000000000000_CreateIdentitySchema.Designer.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Controllers │ │ ├── OidcConfigurationController.cs │ │ └── WeatherForecastController.cs │ ├── Areas │ │ └── Identity │ │ │ └── Pages │ │ │ └── Shared │ │ │ └── _LoginPartial.cshtml │ ├── AntDesignTemplate.Server.csproj │ └── Startup.cs ├── Client │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── icon-512.png │ │ ├── service-worker.js │ │ ├── manifest.json │ │ ├── appsettings.json │ │ ├── index.html │ │ └── service-worker.published.js │ ├── Pages │ │ └── Authentication.razor │ ├── Shared │ │ └── RedirectToLogin.razor │ ├── _Imports.razor │ ├── Services │ │ └── LoginService.cs │ ├── DelegatingHandlers │ │ └── AccessTokenNotAvailableExceptionMessageHandler.cs │ ├── App.razor │ ├── Properties │ │ └── launchSettings.json │ ├── AntDesignTemplate.Client.csproj │ └── Program.cs └── Shared │ ├── AntDesignTemplate.Shared.csproj │ ├── Services │ └── ILoginService.cs │ └── WeatherForecast.cs ├── package.json ├── LICENSE ├── README.md ├── .gitattributes ├── AntDesignTemplate.sln └── .gitignore /src/UI/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './global.less'; -------------------------------------------------------------------------------- /src/IdentityServer/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /src/Server/app.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlazorHub/AntDesignTemplate/HEAD/src/Server/app.db -------------------------------------------------------------------------------- /src/Client/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlazorHub/AntDesignTemplate/HEAD/src/Client/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/Client/wwwroot/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlazorHub/AntDesignTemplate/HEAD/src/Client/wwwroot/icon-512.png -------------------------------------------------------------------------------- /src/IdentityServer/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using IdentityServer 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /src/IdentityServer/wwwroot/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlazorHub/AntDesignTemplate/HEAD/src/IdentityServer/wwwroot/icon.jpg -------------------------------------------------------------------------------- /src/IdentityServer/wwwroot/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlazorHub/AntDesignTemplate/HEAD/src/IdentityServer/wwwroot/icon.png -------------------------------------------------------------------------------- /src/IdentityServer/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlazorHub/AntDesignTemplate/HEAD/src/IdentityServer/wwwroot/favicon.ico -------------------------------------------------------------------------------- /src/IdentityServer/wwwroot/js/signin-redirect.js: -------------------------------------------------------------------------------- 1 | window.location.href = document.querySelector("meta[http-equiv=refresh]").getAttribute("data-url"); 2 | -------------------------------------------------------------------------------- /src/UI/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 | -------------------------------------------------------------------------------- /src/IdentityServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "SelfHost": { 4 | "commandName": "Project", 5 | "launchBrowser": true, 6 | "environmentVariables": { 7 | "ASPNETCORE_ENVIRONMENT": "Development" 8 | }, 9 | "applicationUrl": "https://localhost:5001" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/UI/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 | -------------------------------------------------------------------------------- /src/UI/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Components.Forms 3 | @using Microsoft.AspNetCore.Components.Routing 4 | @using Microsoft.AspNetCore.Components.Web 5 | @using Microsoft.AspNetCore.Components.Authorization 6 | @using Microsoft.JSInterop 7 | @using AntDesign 8 | @using AntDesignTemplate.UI 9 | @using AntDesignTemplate.UI.Shared -------------------------------------------------------------------------------- /src/Client/wwwroot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AntDesignTemplate", 3 | "short_name": "AntDesignTemplate", 4 | "start_url": "./", 5 | "display": "standalone", 6 | "background_color": "#ffffff", 7 | "theme_color": "#03173d", 8 | "icons": [ 9 | { 10 | "src": "icon-512.png", 11 | "type": "image/png", 12 | "sizes": "512x512" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/IdentityServer/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 IdentityServer 6 | { 7 | public class LogoutInputModel 8 | { 9 | public string LogoutId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/IdentityServer/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 IdentityServer 7 | { 8 | public class RedirectViewModel 9 | { 10 | public string RedirectUrl { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /src/IdentityServer/Quickstart/Account/LogoutViewModel.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 IdentityServer 6 | { 7 | public class LogoutViewModel : LogoutInputModel 8 | { 9 | public bool ShowLogoutPrompt { get; set; } = true; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/IdentityServer/Views/Device/UserCodeCapture.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Would you like to logout of IdentityServer?
11 | 19 |You are not authorized to access this resource.
14 | } 15 |Sorry, there's nothing at this address.
21 |
14 | Request ID: @Model.RequestId
15 |
20 | Swapping to the Development environment displays detailed information about the error that occurred. 21 |
22 |23 | The Development environment shouldn't be enabled for deployed applications. 24 | It can result in displaying sensitive information from exceptions to end users. 25 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 26 | and restarting the app. 27 |
28 | -------------------------------------------------------------------------------- /src/Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:11606", 7 | "sslPort": 44326 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "AntDesignTemplate": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", 23 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 24 | "environmentVariables": { 25 | "ASPNETCORE_ENVIRONMENT": "Development" 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/IdentityServer/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 IdentityServer 10 | { 11 | public class LoginViewModel : LoginInputModel 12 | { 13 | public bool AllowRememberLogin { get; set; } = true; 14 | public bool EnableLocalLogin { get; set; } = true; 15 | 16 | public IEnumerableThis component demonstrates fetching data from the server.
11 | 12 | @if (forecasts == null) 13 | { 14 |Loading...
15 | } 16 | else 17 | { 18 || Date | 22 |Temp. (C) | 23 |Temp. (F) | 24 |Summary | 25 |
|---|---|---|---|
| @forecast.Date.ToShortDateString() | 32 |@forecast.TemperatureC | 33 |@forecast.TemperatureF | 34 |@forecast.Summary | 35 |
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 |