Class OidcClientRegistration.Builder
java.lang.Object
org.springframework.security.oauth2.server.authorization.AbstractOAuth2ClientRegistration.AbstractBuilder<OidcClientRegistration,OidcClientRegistration.Builder>
org.springframework.security.oauth2.server.authorization.oidc.OidcClientRegistration.Builder
- Enclosing class:
- OidcClientRegistration
public static final class OidcClientRegistration.Builder
extends AbstractOAuth2ClientRegistration.AbstractBuilder<OidcClientRegistration,OidcClientRegistration.Builder>
Helps configure an
OidcClientRegistration.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Validate the claims and build theOidcClientRegistration.idTokenSignedResponseAlgorithm(String idTokenSignedResponseAlgorithm) postLogoutRedirectUri(String postLogoutRedirectUri) Add the post logout redirectionURIused by the Client, OPTIONAL.postLogoutRedirectUris(Consumer<List<String>> postLogoutRedirectUrisConsumer) AConsumerof the post logout redirectionURIvalues used by the Client, allowing the ability to add, replace, or remove, OPTIONAL.registrationAccessToken(String registrationAccessToken) Sets the Registration Access Token that can be used at the Client Configuration Endpoint, OPTIONAL.registrationClientUrl(String registrationClientUrl) Sets theURLof the Client Configuration Endpoint where the Registration Access Token can be used, OPTIONAL.tokenEndpointAuthenticationSigningAlgorithm(String authenticationSigningAlgorithm) Sets theJWSalgorithm that must be used for signing theJWTused to authenticate the Client at the Token Endpoint for theprivate_key_jwtandclient_secret_jwtauthentication methods, OPTIONAL.protected voidvalidate()Methods inherited from class org.springframework.security.oauth2.server.authorization.AbstractOAuth2ClientRegistration.AbstractBuilder
claim, claims, clientId, clientIdIssuedAt, clientName, clientSecret, clientSecretExpiresAt, getClaims, getThis, grantType, grantTypes, jwkSetUrl, redirectUri, redirectUris, responseType, responseTypes, scope, scopes, tokenEndpointAuthenticationMethod
-
Method Details
-
postLogoutRedirectUri
Add the post logout redirectionURIused by the Client, OPTIONAL. Thepost_logout_redirect_uriparameter is used by the client when requesting that the End-User's User Agent be redirected to after a logout has been performed.- Parameters:
postLogoutRedirectUri- the post logout redirectionURIused by the Client- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
postLogoutRedirectUris
public OidcClientRegistration.Builder postLogoutRedirectUris(Consumer<List<String>> postLogoutRedirectUrisConsumer) AConsumerof the post logout redirectionURIvalues used by the Client, allowing the ability to add, replace, or remove, OPTIONAL.- Parameters:
postLogoutRedirectUrisConsumer- aConsumerof the post logout redirectionURIvalues used by the Client- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
tokenEndpointAuthenticationSigningAlgorithm
public OidcClientRegistration.Builder tokenEndpointAuthenticationSigningAlgorithm(String authenticationSigningAlgorithm) Sets theJWSalgorithm that must be used for signing theJWTused to authenticate the Client at the Token Endpoint for theprivate_key_jwtandclient_secret_jwtauthentication methods, OPTIONAL.- Parameters:
authenticationSigningAlgorithm- theJWSalgorithm that must be used for signing theJWTused to authenticate the Client at the Token Endpoint- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
idTokenSignedResponseAlgorithm
public OidcClientRegistration.Builder idTokenSignedResponseAlgorithm(String idTokenSignedResponseAlgorithm) - Parameters:
idTokenSignedResponseAlgorithm- theJWSalgorithm required for signing theID Tokenissued to the Client- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
registrationAccessToken
Sets the Registration Access Token that can be used at the Client Configuration Endpoint, OPTIONAL.- Parameters:
registrationAccessToken- the Registration Access Token that can be used at the Client Configuration Endpoint- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
registrationClientUrl
Sets theURLof the Client Configuration Endpoint where the Registration Access Token can be used, OPTIONAL.- Parameters:
registrationClientUrl- theURLof the Client Configuration Endpoint where the Registration Access Token can be used- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
build
Validate the claims and build theOidcClientRegistration.The following claims are REQUIRED:
client_id,redirect_uris.- Specified by:
buildin classAbstractOAuth2ClientRegistration.AbstractBuilder<OidcClientRegistration,OidcClientRegistration.Builder> - Returns:
- the
OidcClientRegistration
-
validate
protected void validate()
-