|
|
|
@ -87,7 +87,7 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
/* MyProjectName_Web client is only needed if you created a tiered |
|
|
|
* solution. Otherwise, you can delete this client. */ |
|
|
|
await CreateApplicationAsync( |
|
|
|
name: webClientId, |
|
|
|
name: webClientId!, |
|
|
|
type: OpenIddictConstants.ClientTypes.Confidential, |
|
|
|
consentType: OpenIddictConstants.ConsentTypes.Implicit, |
|
|
|
displayName: "Web Application", |
|
|
|
@ -110,7 +110,7 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
{ |
|
|
|
var consoleAndAngularClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/'); |
|
|
|
await CreateApplicationAsync( |
|
|
|
name: consoleAndAngularClientId, |
|
|
|
name: consoleAndAngularClientId!, |
|
|
|
type: OpenIddictConstants.ClientTypes.Public, |
|
|
|
consentType: OpenIddictConstants.ConsentTypes.Implicit, |
|
|
|
displayName: "Console Test / Angular Application", |
|
|
|
@ -133,10 +133,10 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
var blazorClientId = configurationSection["MyProjectName_Blazor:ClientId"]; |
|
|
|
if (!blazorClientId.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
var blazorRootUrl = configurationSection["MyProjectName_Blazor:RootUrl"].TrimEnd('/'); |
|
|
|
var blazorRootUrl = configurationSection["MyProjectName_Blazor:RootUrl"]?.TrimEnd('/'); |
|
|
|
|
|
|
|
await CreateApplicationAsync( |
|
|
|
name: blazorClientId, |
|
|
|
name: blazorClientId!, |
|
|
|
type: OpenIddictConstants.ClientTypes.Public, |
|
|
|
consentType: OpenIddictConstants.ConsentTypes.Implicit, |
|
|
|
displayName: "Blazor Application", |
|
|
|
@ -159,7 +159,7 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
var blazorServerTieredRootUrl = configurationSection["MyProjectName_BlazorServerTiered:RootUrl"].EnsureEndsWith('/'); |
|
|
|
|
|
|
|
await CreateApplicationAsync( |
|
|
|
name: blazorServerTieredClientId, |
|
|
|
name: blazorServerTieredClientId!, |
|
|
|
type: OpenIddictConstants.ClientTypes.Confidential, |
|
|
|
consentType: OpenIddictConstants.ConsentTypes.Implicit, |
|
|
|
displayName: "Blazor Server Application", |
|
|
|
@ -180,10 +180,10 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
var swaggerClientId = configurationSection["MyProjectName_Swagger:ClientId"]; |
|
|
|
if (!swaggerClientId.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
var swaggerRootUrl = configurationSection["MyProjectName_Swagger:RootUrl"].TrimEnd('/'); |
|
|
|
var swaggerRootUrl = configurationSection["MyProjectName_Swagger:RootUrl"]?.TrimEnd('/'); |
|
|
|
|
|
|
|
await CreateApplicationAsync( |
|
|
|
name: swaggerClientId, |
|
|
|
name: swaggerClientId!, |
|
|
|
type: OpenIddictConstants.ClientTypes.Public, |
|
|
|
consentType: OpenIddictConstants.ConsentTypes.Implicit, |
|
|
|
displayName: "Swagger Application", |
|
|
|
@ -204,13 +204,13 @@ public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDep |
|
|
|
[NotNull] string type, |
|
|
|
[NotNull] string consentType, |
|
|
|
string displayName, |
|
|
|
string secret, |
|
|
|
string? secret, |
|
|
|
List<string> grantTypes, |
|
|
|
List<string> scopes, |
|
|
|
string clientUri = null, |
|
|
|
string redirectUri = null, |
|
|
|
string postLogoutRedirectUri = null, |
|
|
|
List<string> permissions = null) |
|
|
|
string? clientUri = null, |
|
|
|
string? redirectUri = null, |
|
|
|
string? postLogoutRedirectUri = null, |
|
|
|
List<string>? permissions = null) |
|
|
|
{ |
|
|
|
if (!string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase)) |
|
|
|
{ |
|
|
|
|