Browse Source
Merge pull request #13035 from abpframework/liangshiwei/patch
Update OpenIddictDataSeedContributor
pull/13037/head
maliming
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
6 deletions
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/OpenIddict/OpenIddictDataSeedContributor.cs
-
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/OpenIddict/OpenIddictDataSeedContributor.cs
|
|
|
@ -106,7 +106,7 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
var consoleAndAngularClientId = configurationSection["MyProjectName_App:ClientId"]; |
|
|
|
if (!consoleAndAngularClientId.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
var webClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/'); |
|
|
|
var consoleAndAngularClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/'); |
|
|
|
await CreateApplicationAsync( |
|
|
|
name: consoleAndAngularClientId, |
|
|
|
type: OpenIddictConstants.ClientTypes.Public, |
|
|
|
@ -121,8 +121,8 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
OpenIddictConstants.GrantTypes.RefreshToken |
|
|
|
}, |
|
|
|
scopes: commonScopes, |
|
|
|
redirectUri: webClientRootUrl, |
|
|
|
postLogoutRedirectUri: webClientRootUrl |
|
|
|
redirectUri: consoleAndAngularClientRootUrl, |
|
|
|
postLogoutRedirectUri: consoleAndAngularClientRootUrl |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -106,7 +106,7 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
var consoleAndAngularClientId = configurationSection["MyProjectName_App:ClientId"]; |
|
|
|
if (!consoleAndAngularClientId.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
var webClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/'); |
|
|
|
var consoleAndAngularClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/'); |
|
|
|
await CreateApplicationAsync( |
|
|
|
name: consoleAndAngularClientId, |
|
|
|
type: OpenIddictConstants.ClientTypes.Public, |
|
|
|
@ -121,8 +121,8 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
OpenIddictConstants.GrantTypes.RefreshToken |
|
|
|
}, |
|
|
|
scopes: commonScopes, |
|
|
|
redirectUri: webClientRootUrl, |
|
|
|
postLogoutRedirectUri: webClientRootUrl |
|
|
|
redirectUri: consoleAndAngularClientRootUrl, |
|
|
|
postLogoutRedirectUri: consoleAndAngularClientRootUrl |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|