From 7f29e71f23a33a8a65bafbead8b6c467629dee58 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Wed, 17 Jun 2020 23:11:27 +0300 Subject: [PATCH] Update IdentityServerDataSeedContributor.cs --- .../IdentityServerDataSeedContributor.cs | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs index b5c7ac27cf..2bce06c77d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs @@ -116,12 +116,13 @@ namespace MyCompanyName.MyProjectName.IdentityServer * solution. Otherwise, you can delete this client. */ await CreateClientAsync( - webClientId, - commonScopes, - new[] { "hybrid" }, - (configurationSection["MyProjectName_Web:ClientSecret"] ?? "1q2w3e*").Sha256(), + name: webClientId, + scopes: commonScopes, + grantTypes: new[] {"hybrid"}, + secret: (configurationSection["MyProjectName_Web:ClientSecret"] ?? "1q2w3e*").Sha256(), redirectUri: $"{webClientRootUrl}signin-oidc", - postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc" + postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc", + frontChannelLogoutUri: $"{webClientRootUrl}Account/FrontChannelLogout" ); } @@ -130,10 +131,10 @@ namespace MyCompanyName.MyProjectName.IdentityServer if (!consoleClientId.IsNullOrWhiteSpace()) { await CreateClientAsync( - consoleClientId, - commonScopes, - new[] { "password", "client_credentials" }, - (configurationSection["MyProjectName_App:ClientSecret"] ?? "1q2w3e*").Sha256() + name: consoleClientId, + scopes: commonScopes, + grantTypes: new[] {"password", "client_credentials"}, + secret: (configurationSection["MyProjectName_App:ClientSecret"] ?? "1q2w3e*").Sha256() ); } } @@ -145,6 +146,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer string secret, string redirectUri = null, string postLogoutRedirectUri = null, + string frontChannelLogoutUri = null, IEnumerable permissions = null) { var client = await _clientRepository.FindByCliendIdAsync(name); @@ -165,7 +167,8 @@ namespace MyCompanyName.MyProjectName.IdentityServer AccessTokenLifetime = 31536000, //365 days AuthorizationCodeLifetime = 300, IdentityTokenLifetime = 300, - RequireConsent = false + RequireConsent = false, + FrontChannelLogoutUri = frontChannelLogoutUri }, autoSave: true );