Class OidcClientRegistration.Builder
java.lang.Object
org.springframework.security.oauth2.server.authorization.oidc.OidcClientRegistration.Builder
- Enclosing class:
- OidcClientRegistration
Helps configure an
OidcClientRegistration.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Validate the claims and build theOidcClientRegistration.Sets the claim.Provides access to everyclaim(String, Object)declared so far allowing the ability to add, replace, or remove.Sets the Client Identifier, REQUIRED.clientIdIssuedAt(Instant clientIdIssuedAt) Sets the time at which the Client Identifier was issued, OPTIONAL.clientName(String clientName) Sets the name of the Client to be presented to the End-User, OPTIONAL.clientSecret(String clientSecret) Sets the Client Secret, OPTIONAL.clientSecretExpiresAt(Instant clientSecretExpiresAt) Sets the time at which theclient_secretwill expire ornullif it will not expire, REQUIRED ifclient_secretwas issued.Add the OAuth 2.0grant_typethat the Client will restrict itself to using, OPTIONAL.grantTypes(Consumer<List<String>> grantTypesConsumer) AConsumerof the OAuth 2.0grant_typevalues that the Client will restrict itself to using, allowing the ability to add, replace, or remove, OPTIONAL.idTokenSignedResponseAlgorithm(String idTokenSignedResponseAlgorithm) Sets theJWSalgorithm required for signing theID Tokenissued to the Client, OPTIONAL.Sets theURLfor the Client's JSON Web Key Set, OPTIONAL.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.redirectUri(String redirectUri) Add the redirectionURIused by the Client, REQUIRED.redirectUris(Consumer<List<String>> redirectUrisConsumer) AConsumerof the redirectionURIvalues used by the Client, allowing the ability to add, replace, or remove, REQUIRED.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.responseType(String responseType) Add the OAuth 2.0response_typethat the Client will restrict itself to using, OPTIONAL.responseTypes(Consumer<List<String>> responseTypesConsumer) AConsumerof the OAuth 2.0response_typevalues that the Client will restrict itself to using, allowing the ability to add, replace, or remove, OPTIONAL.Add the OAuth 2.0scopethat the Client will restrict itself to using, OPTIONAL.AConsumerof the OAuth 2.0scopevalues that the Client will restrict itself to using, allowing the ability to add, replace, or remove, OPTIONAL.tokenEndpointAuthenticationMethod(String tokenEndpointAuthenticationMethod) Sets the authentication method used by the Client for the Token Endpoint, 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.
-
Method Details
-
clientId
Sets the Client Identifier, REQUIRED.- Parameters:
clientId- the Client Identifier- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
clientIdIssuedAt
Sets the time at which the Client Identifier was issued, OPTIONAL.- Parameters:
clientIdIssuedAt- the time at which the Client Identifier was issued- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
clientSecret
Sets the Client Secret, OPTIONAL.- Parameters:
clientSecret- the Client Secret- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
clientSecretExpiresAt
Sets the time at which theclient_secretwill expire ornullif it will not expire, REQUIRED ifclient_secretwas issued.- Parameters:
clientSecretExpiresAt- the time at which theclient_secretwill expire ornullif it will not expire- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
clientName
Sets the name of the Client to be presented to the End-User, OPTIONAL.- Parameters:
clientName- the name of the Client to be presented to the End-User- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
redirectUri
Add the redirectionURIused by the Client, REQUIRED.- Parameters:
redirectUri- the redirectionURIused by the Client- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
redirectUris
AConsumerof the redirectionURIvalues used by the Client, allowing the ability to add, replace, or remove, REQUIRED.- Parameters:
redirectUrisConsumer- aConsumerof the redirectionURIvalues used by the Client- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
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 - Since:
- 1.1
-
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 - Since:
- 1.1
-
tokenEndpointAuthenticationMethod
public OidcClientRegistration.Builder tokenEndpointAuthenticationMethod(String tokenEndpointAuthenticationMethod) Sets the authentication method used by the Client for the Token Endpoint, OPTIONAL.- Parameters:
tokenEndpointAuthenticationMethod- the authentication method used by the Client for the Token Endpoint- 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 - Since:
- 0.2.2
-
grantType
Add the OAuth 2.0grant_typethat the Client will restrict itself to using, OPTIONAL.- Parameters:
grantType- the OAuth 2.0grant_typethat the Client will restrict itself to using- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
grantTypes
AConsumerof the OAuth 2.0grant_typevalues that the Client will restrict itself to using, allowing the ability to add, replace, or remove, OPTIONAL.- Parameters:
grantTypesConsumer- aConsumerof the OAuth 2.0grant_typevalues that the Client will restrict itself to using- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
responseType
Add the OAuth 2.0response_typethat the Client will restrict itself to using, OPTIONAL.- Parameters:
responseType- the OAuth 2.0response_typethat the Client will restrict itself to using- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
responseTypes
AConsumerof the OAuth 2.0response_typevalues that the Client will restrict itself to using, allowing the ability to add, replace, or remove, OPTIONAL.- Parameters:
responseTypesConsumer- aConsumerof the OAuth 2.0response_typevalues that the Client will restrict itself to using- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
scope
Add the OAuth 2.0scopethat the Client will restrict itself to using, OPTIONAL.- Parameters:
scope- the OAuth 2.0scopethat the Client will restrict itself to using- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
scopes
AConsumerof the OAuth 2.0scopevalues that the Client will restrict itself to using, allowing the ability to add, replace, or remove, OPTIONAL.- Parameters:
scopesConsumer- aConsumerof the OAuth 2.0scopevalues that the Client will restrict itself to using- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
jwkSetUrl
Sets theURLfor the Client's JSON Web Key Set, OPTIONAL.- Parameters:
jwkSetUrl- theURLfor the Client's JSON Web Key Set- Returns:
- the
OidcClientRegistration.Builderfor further configuration - Since:
- 0.2.2
-
idTokenSignedResponseAlgorithm
public OidcClientRegistration.Builder idTokenSignedResponseAlgorithm(String idTokenSignedResponseAlgorithm) Sets theJWSalgorithm required for signing theID Tokenissued to the Client, OPTIONAL.- 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 - Since:
- 0.2.1
-
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 - Since:
- 0.2.1
-
claim
Sets the claim.- Parameters:
name- the claim namevalue- the claim value- Returns:
- the
OidcClientRegistration.Builderfor further configuration
-
claims
Provides access to everyclaim(String, Object)declared so far allowing the ability to add, replace, or remove.- Parameters:
claimsConsumer- aConsumerof the claims- Returns:
- the
OidcClientRegistration.Builderfor further configurations
-
build
Validate the claims and build theOidcClientRegistration.The following claims are REQUIRED:
client_id,redirect_uris.- Returns:
- the
OidcClientRegistration
-