|
|
|
@ -24,9 +24,21 @@ namespace Squidex.Config.Authentication |
|
|
|
options.Authority = identityOptions.OidcAuthority; |
|
|
|
options.ClientId = identityOptions.OidcClient; |
|
|
|
options.ClientSecret = identityOptions.OidcSecret; |
|
|
|
options.RequireHttpsMetadata = false; |
|
|
|
options.RequireHttpsMetadata = identityOptions.RequiresHttps; |
|
|
|
options.Events = new OidcHandler(identityOptions); |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(identityOptions.OidcMetadataAddress)) |
|
|
|
{ |
|
|
|
options.MetadataAddress = identityOptions.OidcMetadataAddress; |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(identityOptions.OidcResponseType)) |
|
|
|
{ |
|
|
|
options.ResponseType = identityOptions.OidcResponseType; |
|
|
|
} |
|
|
|
|
|
|
|
options.GetClaimsFromUserInfoEndpoint = identityOptions.OidcGetClaimsFromUserInfoEndpoint; |
|
|
|
|
|
|
|
if (identityOptions.OidcScopes != null) |
|
|
|
{ |
|
|
|
foreach (var scope in identityOptions.OidcScopes) |
|
|
|
|