Class OidcProviderConfiguration.Builder
java.lang.Object
org.springframework.security.oauth2.server.authorization.AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<OidcProviderConfiguration,OidcProviderConfiguration.Builder>
org.springframework.security.oauth2.server.authorization.oidc.OidcProviderConfiguration.Builder
- Enclosing class:
- OidcProviderConfiguration
public static final class OidcProviderConfiguration.Builder
extends AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<OidcProviderConfiguration,OidcProviderConfiguration.Builder>
Helps configure an
OidcProviderConfiguration.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Validate the claims and build theOidcProviderConfiguration.endSessionEndpoint(String endSessionEndpoint) Use thisend_session_endpointin the resultingOidcProviderConfiguration, OPTIONAL.idTokenSigningAlgorithm(String signingAlgorithm) Add thisJWSsigning algorithm to the collection ofid_token_signing_alg_values_supportedin the resultingOidcProviderConfiguration, REQUIRED.idTokenSigningAlgorithms(Consumer<List<String>> signingAlgorithmsConsumer) subjectType(String subjectType) Add this Subject Type to the collection ofsubject_types_supportedin the resultingOidcProviderConfiguration, REQUIRED.subjectTypes(Consumer<List<String>> subjectTypesConsumer) AConsumerof the Subject Types(s) allowing the ability to add, replace, or remove.userInfoEndpoint(String userInfoEndpoint) Use thisuserinfo_endpointin the resultingOidcProviderConfiguration, OPTIONAL.protected voidvalidate()Methods inherited from class org.springframework.security.oauth2.server.authorization.AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
authorizationEndpoint, claim, claims, clientRegistrationEndpoint, codeChallengeMethod, codeChallengeMethods, deviceAuthorizationEndpoint, dPoPSigningAlgorithm, dPoPSigningAlgorithms, getClaims, getThis, grantType, grantTypes, issuer, jwkSetUrl, pushedAuthorizationRequestEndpoint, responseType, responseTypes, scope, scopes, tlsClientCertificateBoundAccessTokens, tokenEndpoint, tokenEndpointAuthenticationMethod, tokenEndpointAuthenticationMethods, tokenIntrospectionEndpoint, tokenIntrospectionEndpointAuthenticationMethod, tokenIntrospectionEndpointAuthenticationMethods, tokenRevocationEndpoint, tokenRevocationEndpointAuthenticationMethod, tokenRevocationEndpointAuthenticationMethods, validateURL
-
Method Details
-
subjectType
Add this Subject Type to the collection ofsubject_types_supportedin the resultingOidcProviderConfiguration, REQUIRED.- Parameters:
subjectType- the Subject Type that the OpenID Provider supports- Returns:
- the
OidcProviderConfiguration.Builderfor further configuration
-
subjectTypes
AConsumerof the Subject Types(s) allowing the ability to add, replace, or remove.- Parameters:
subjectTypesConsumer- aConsumerof the Subject Types(s)- Returns:
- the
OidcProviderConfiguration.Builderfor further configuration
-
idTokenSigningAlgorithm
Add thisJWSsigning algorithm to the collection ofid_token_signing_alg_values_supportedin the resultingOidcProviderConfiguration, REQUIRED.- Parameters:
signingAlgorithm- theJWSsigning algorithm supported for theID Token- Returns:
- the
OidcProviderConfiguration.Builderfor further configuration
-
idTokenSigningAlgorithms
public OidcProviderConfiguration.Builder idTokenSigningAlgorithms(Consumer<List<String>> signingAlgorithmsConsumer) AConsumerof theJWSsigning algorithms for theID Tokenallowing the ability to add, replace, or remove.- Parameters:
signingAlgorithmsConsumer- aConsumerof theJWSsigning algorithms for theID Token- Returns:
- the
OidcProviderConfiguration.Builderfor further configuration
-
userInfoEndpoint
Use thisuserinfo_endpointin the resultingOidcProviderConfiguration, OPTIONAL.- Parameters:
userInfoEndpoint- theURLof the OpenID Connect 1.0 UserInfo Endpoint- Returns:
- the
OidcProviderConfiguration.Builderfor further configuration
-
endSessionEndpoint
Use thisend_session_endpointin the resultingOidcProviderConfiguration, OPTIONAL.- Parameters:
endSessionEndpoint- theURLof the OpenID Connect 1.0 End Session Endpoint- Returns:
- the
OidcProviderConfiguration.Builderfor further configuration
-
build
Validate the claims and build theOidcProviderConfiguration.The following claims are REQUIRED:
issuer,authorization_endpoint,token_endpoint,jwks_uri,response_types_supported,subject_types_supportedandid_token_signing_alg_values_supported.- Specified by:
buildin classAbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<OidcProviderConfiguration,OidcProviderConfiguration.Builder> - Returns:
- the
OidcProviderConfiguration
-
validate
protected void validate()
-