├── client ├── WeatherMvc │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ ├── Privacy.cshtml │ │ │ ├── Index.cshtml │ │ │ └── Weather.cshtml │ │ └── Shared │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ ├── Error.cshtml │ │ │ ├── _Layout.cshtml.css │ │ │ └── _Layout.cshtml │ ├── wwwroot │ │ ├── favicon.ico │ │ ├── js │ │ │ └── site.js │ │ ├── css │ │ │ └── site.css │ │ └── 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.rtl.min.css │ │ │ │ ├── bootstrap-reboot.rtl.css │ │ │ │ └── bootstrap-reboot.css │ │ │ └── jquery │ │ │ └── LICENSE.txt │ ├── appsettings.Development.json │ ├── Models │ │ ├── ErrorViewModel.cs │ │ └── WeatherData.cs │ ├── Services │ │ ├── ITokenService.cs │ │ ├── IdentityServerSettings.cs │ │ └── TokenService.cs │ ├── WeatherMvc.csproj │ ├── appsettings.json │ ├── Properties │ │ └── launchSettings.json │ ├── Program.cs │ └── Controllers │ │ └── HomeController.cs ├── weatherapi │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── WeatherForecast.cs │ ├── weatherapi.csproj │ ├── Properties │ │ └── launchSettings.json │ ├── Program.cs │ └── Controllers │ │ └── WeatherForecastController.cs └── client.sln ├── identity └── ids │ ├── Pages │ ├── _ViewStart.cshtml │ ├── _ViewImports.cshtml │ ├── Account │ │ ├── Logout │ │ │ ├── LogoutOptions.cs │ │ │ ├── LoggedOutViewModel.cs │ │ │ ├── Index.cshtml │ │ │ ├── LoggedOut.cshtml │ │ │ ├── LoggedOut.cshtml.cs │ │ │ └── Index.cshtml.cs │ │ ├── AccessDenied.cshtml.cs │ │ ├── AccessDenied.cshtml │ │ └── Login │ │ │ ├── LoginOptions.cs │ │ │ ├── InputModel.cs │ │ │ ├── ViewModel.cs │ │ │ └── Index.cshtml │ ├── Shared │ │ ├── _ValidationSummary.cshtml │ │ ├── _Nav.cshtml │ │ └── _Layout.cshtml │ ├── Device │ │ ├── Success.cshtml │ │ ├── Success.cshtml.cs │ │ ├── InputModel.cs │ │ ├── DeviceOptions.cs │ │ ├── ViewModel.cs │ │ ├── _ScopeListItem.cshtml │ │ ├── Index.cshtml │ │ └── Index.cshtml.cs │ ├── ExternalLogin │ │ ├── Callback.cshtml │ │ ├── Challenge.cshtml │ │ ├── Challenge.cshtml.cs │ │ └── Callback.cshtml.cs │ ├── Redirect │ │ ├── Index.cshtml │ │ └── Index.cshtml.cs │ ├── Ciba │ │ ├── InputModel.cs │ │ ├── ConsentOptions.cs │ │ ├── Index.cshtml │ │ ├── ViewModel.cs │ │ ├── All.cshtml.cs │ │ ├── Index.cshtml.cs │ │ ├── _ScopeListItem.cshtml │ │ ├── All.cshtml │ │ └── Consent.cshtml │ ├── Home │ │ └── Error │ │ │ ├── ViewModel.cs │ │ │ ├── Index.cshtml │ │ │ └── Index.cshtml.cs │ ├── Consent │ │ ├── InputModel.cs │ │ ├── ConsentOptions.cs │ │ ├── ViewModel.cs │ │ ├── _ScopeListItem.cshtml │ │ └── Index.cshtml │ ├── Index.cshtml.cs │ ├── Grants │ │ ├── ViewModel.cs │ │ ├── Index.cshtml.cs │ │ └── Index.cshtml │ ├── Diagnostics │ │ ├── Index.cshtml.cs │ │ ├── ViewModel.cs │ │ └── Index.cshtml │ ├── Index.cshtml │ ├── Extensions.cs │ ├── TestUsers.cs │ └── SecurityHeadersAttribute.cs │ ├── wwwroot │ ├── js │ │ ├── signin-redirect.js │ │ └── signout-redirect.js │ ├── favicon.ico │ ├── lib │ │ ├── bootstrap4-glyphicons │ │ │ └── fonts │ │ │ │ └── glyphicons │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── jquery │ │ │ ├── LICENSE.txt │ │ │ └── README.md │ │ └── bootstrap │ │ │ ├── LICENSE │ │ │ └── dist │ │ │ └── css │ │ │ ├── bootstrap-reboot.min.css │ │ │ └── bootstrap-reboot.css │ ├── css │ │ ├── site.min.css │ │ ├── site.css │ │ └── site.scss │ └── duende-logo.svg │ ├── IdentityServer.db │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Database │ └── ApplicationDbContext.cs │ ├── identity.sln │ ├── Identity │ └── Identity.sln │ ├── Properties │ └── launchSettings.json │ ├── ids.csproj │ ├── Config.cs │ ├── keys │ ├── is-signing-key-9F3D0AFEA150B43D86018342E1CAF277.json │ └── is-signing-key-FBA1D8C7F576AB008D088B44C7B0B592.json │ ├── TestUsers.cs │ ├── Program.cs │ ├── SeedData.cs │ └── Migrations │ └── PersistedGrantDb │ ├── 20220405133255_InitialIdentityServerMigration.cs │ ├── PersistedGrantDbContextModelSnapshot.cs │ └── 20220405133255_InitialIdentityServerMigration.Designer.cs ├── LICENSE └── .gitignore /client/WeatherMvc/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } -------------------------------------------------------------------------------- /identity/ids/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /identity/ids/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using IdentityServerHost.Pages 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 3 | -------------------------------------------------------------------------------- /client/WeatherMvc/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WeatherMvc 2 | @using WeatherMvc.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /identity/ids/wwwroot/js/signin-redirect.js: -------------------------------------------------------------------------------- 1 | window.location.href = document.querySelector("meta[http-equiv=refresh]").getAttribute("data-url"); 2 | -------------------------------------------------------------------------------- /identity/ids/IdentityServer.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinrjones/SettingUpDuendeIdentityServerWithEntityFramework/HEAD/identity/ids/IdentityServer.db -------------------------------------------------------------------------------- /identity/ids/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinrjones/SettingUpDuendeIdentityServerWithEntityFramework/HEAD/identity/ids/wwwroot/favicon.ico -------------------------------------------------------------------------------- /client/WeatherMvc/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinrjones/SettingUpDuendeIdentityServerWithEntityFramework/HEAD/client/WeatherMvc/wwwroot/favicon.ico -------------------------------------------------------------------------------- /client/WeatherMvc/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |
Use this page to detail your site's privacy policy.
-------------------------------------------------------------------------------- /client/WeatherMvc/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /identity/ids/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /client/weatherapi/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /client/weatherapi/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /identity/ids/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 | -------------------------------------------------------------------------------- /client/WeatherMvc/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace WeatherMvc.Models; 2 | 3 | public class ErrorViewModel 4 | { 5 | public string? RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } -------------------------------------------------------------------------------- /client/WeatherMvc/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /identity/ids/Pages/Account/Logout/LogoutOptions.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace IdentityServerHost.Pages.Logout; 3 | 4 | public class LogoutOptions 5 | { 6 | public static bool ShowLogoutPrompt = true; 7 | public static bool AutomaticRedirectAfterSignOut = false; 8 | } -------------------------------------------------------------------------------- /identity/ids/Pages/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |Learn about building Web apps with ASP.NET Core.
8 |You do not have permission to access that resource.
9 |You have successfully authorized the device
11 |Once complete, you may close this tab.
10 || @item.Date | 15 |@item.Summary | 16 |@item.TemperatureF | 17 |@item.TemperatureC | 18 |
Would you like to logout of IdentityServer?
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 |
-------------------------------------------------------------------------------- /client/weatherapi/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:38464", 8 | "sslPort": 44348 9 | } 10 | }, 11 | "profiles": { 12 | "weatherapi": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:5445;http://localhost:5002", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /identity/ids/Pages/Ciba/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IdentityServerHost.Pages.Ciba.IndexModel 3 | @{ 4 | } 5 | 6 |23 | Do you wish to continue? 24 |
25 || Id | 20 |Client Id | 21 |Binding Message | 22 |23 | |
|---|---|---|---|
| @login.InternalId | 30 |@login.Client.ClientId | 31 |@login.BindingMessage | 32 |33 | Process 34 | | 35 |
Below is the list of applications you have given permission to and the resources they have access to.
10 |Choose how to login
8 |Please enter the code displayed on your device.
13 |Please confirm that the authorization request matches the code: @Model.Input.UserCode.
49 |Uncheck the permissions you do not wish to grant.
50 |