Class OauthConfigurationProperties.OpenIdConfigurationProperties
java.lang.Object
io.micronaut.security.oauth2.configuration.OauthConfigurationProperties.OpenIdConfigurationProperties
- All Implemented Interfaces:
OpenIdConfiguration
- Enclosing class:
OauthConfigurationProperties
@ConfigurationProperties("openid")
public static class OauthConfigurationProperties.OpenIdConfigurationProperties
extends Object
implements OpenIdConfiguration
OpenID configuration.
- Since:
- 1.2.0
- Author:
- Sergio del Amo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClaims configuration.static classClaims Validator configuration.static classEnd session configuration. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWhether the username of anAuthenticationbuilt from an OpenID provider response, by the defaultOpenIdAuthenticationMapperat login or by theUserInfoendpoint token validator, is qualified with the provider name, asproviderName:subject, instead of being the baresubclaim.voidsetAdditionalClaims(OauthConfigurationProperties.OpenIdConfigurationProperties.AdditionalClaimsConfigurationProperties claims) voidsetClaimsValidation(OauthConfigurationProperties.OpenIdConfigurationProperties.ClaimsValidationConfigurationProperties claimsValidator) voidsetEndSession(OauthConfigurationProperties.OpenIdConfigurationProperties.EndSessionConfigurationProperties endSession) The end session configuration.voidsetLogoutUri(String logoutUri) The URI used to log out of an OpenID provider.voidsetQualifyUsernameWithProvider(@Nullable Boolean qualifyUsernameWithProvider) Whether the username of an authentication built from an OpenID provider response, by the default OpenID authentication mapper at login or by the `UserInfo` endpoint token validator, is the `sub` claim qualified with the provider name (`providerName:subject`) instead of the bare `sub` claim.
-
Field Details
-
PREFIX
- See Also:
-
-
Constructor Details
-
OpenIdConfigurationProperties
public OpenIdConfigurationProperties()
-
-
Method Details
-
getLogoutUri
- Specified by:
getLogoutUriin interfaceOpenIdConfiguration- Returns:
- the Callback Uri
-
setLogoutUri
The URI used to log out of an OpenID provider. Default value ("/oauth/logout").- Parameters:
logoutUri- The logout uri
-
getEndSession
- Specified by:
getEndSessionin interfaceOpenIdConfiguration- Returns:
- Optional end session configuration
-
setEndSession
public void setEndSession(OauthConfigurationProperties.OpenIdConfigurationProperties.EndSessionConfigurationProperties endSession) The end session configuration.- Parameters:
endSession- The end session configuration
-
getClaimsValidation
public OauthConfigurationProperties.OpenIdConfigurationProperties.ClaimsValidationConfigurationProperties getClaimsValidation()- Specified by:
getClaimsValidationin interfaceOpenIdConfiguration- Returns:
- Claims Validator Configuration
-
setClaimsValidation
public void setClaimsValidation(OauthConfigurationProperties.OpenIdConfigurationProperties.ClaimsValidationConfigurationProperties claimsValidator) - Parameters:
claimsValidator- Claims Validator Configuration
-
getAdditionalClaims
public OauthConfigurationProperties.OpenIdConfigurationProperties.AdditionalClaimsConfigurationProperties getAdditionalClaims()- Specified by:
getAdditionalClaimsin interfaceOpenIdConfiguration- Returns:
- Claims configuration
-
setAdditionalClaims
public void setAdditionalClaims(OauthConfigurationProperties.OpenIdConfigurationProperties.AdditionalClaimsConfigurationProperties claims) - Parameters:
claims- The Claims Configuration
-
getQualifyUsernameWithProvider
Description copied from interface:OpenIdConfigurationWhether the username of anAuthenticationbuilt from an OpenID provider response, by the defaultOpenIdAuthenticationMapperat login or by theUserInfoendpoint token validator, is qualified with the provider name, asproviderName:subject, instead of being the baresubclaim. Thesubclaim is only unique within one provider, so an unqualified username lets a user at one provider share identity with a user at another provider which issued the samesub.- Specified by:
getQualifyUsernameWithProviderin interfaceOpenIdConfiguration- Returns:
trueto always qualify the username,falseto never qualify it, or empty to qualify only when more than one enabled OAuth 2.0 client, other than client-credentials-only clients, is configured undermicronaut.security.oauth2.clients
-
setQualifyUsernameWithProvider
Whether the username of an authentication built from an OpenID provider response, by the default OpenID authentication mapper at login or by the `UserInfo` endpoint token validator, is the `sub` claim qualified with the provider name (`providerName:subject`) instead of the bare `sub` claim. The `sub` claim is only unique within one provider. If not set, the username is qualified only when more than one enabled OAuth 2.0 client, other than client-credentials-only clients, is configured under `micronaut.security.oauth2.clients`. It does not apply when `micronaut.security.authentication` is `idtoken`.- Parameters:
qualifyUsernameWithProvider- Whether to qualify the username with the provider name.- Since:
- 5.5.2
-