mirror of
https://github.com/bitwarden/server
synced 2025-12-22 19:23:45 +00:00
Added OIDC scope management (#1049)
* added OIDC scope management * Remove errant code comment
This commit is contained in:
@@ -318,6 +318,18 @@ namespace Bit.Core.Business.Sso
|
||||
AuthenticationMethod = config.RedirectBehavior,
|
||||
GetClaimsFromUserInfoEndpoint = config.GetClaimsFromUserInfoEndpoint,
|
||||
};
|
||||
if (!oidcOptions.Scope.Contains(OpenIdConnectScopes.OpenId))
|
||||
{
|
||||
oidcOptions.Scope.Add(OpenIdConnectScopes.OpenId);
|
||||
}
|
||||
if (!oidcOptions.Scope.Contains(OpenIdConnectScopes.Email))
|
||||
{
|
||||
oidcOptions.Scope.Add(OpenIdConnectScopes.Email);
|
||||
}
|
||||
if (!oidcOptions.Scope.Contains(OpenIdConnectScopes.Profile))
|
||||
{
|
||||
oidcOptions.Scope.Add(OpenIdConnectScopes.Profile);
|
||||
}
|
||||
|
||||
return new DynamicAuthenticationScheme(name, name, typeof(OpenIdConnectHandler),
|
||||
oidcOptions, SsoType.OpenIdConnect);
|
||||
|
||||
Reference in New Issue
Block a user