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_endpoint
in the resultingOidcProviderConfiguration
, OPTIONAL.idTokenSigningAlgorithm
(String signingAlgorithm) Add thisJWS
signing algorithm to the collection ofid_token_signing_alg_values_supported
in the resultingOidcProviderConfiguration
, REQUIRED.idTokenSigningAlgorithms
(Consumer<List<String>> signingAlgorithmsConsumer) AConsumer
of theJWS
signing algorithms for theID Token
allowing the ability to add, replace, or remove.subjectType
(String subjectType) Add this Subject Type to the collection ofsubject_types_supported
in the resultingOidcProviderConfiguration
, REQUIRED.subjectTypes
(Consumer<List<String>> subjectTypesConsumer) AConsumer
of the Subject Types(s) allowing the ability to add, replace, or remove.userInfoEndpoint
(String userInfoEndpoint) Use thisuserinfo_endpoint
in the resultingOidcProviderConfiguration
, OPTIONAL.protected void
validate()
Methods inherited from class org.springframework.security.oauth2.server.authorization.AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
authorizationEndpoint, claim, claims, clientRegistrationEndpoint, codeChallengeMethod, codeChallengeMethods, deviceAuthorizationEndpoint, getClaims, getThis, grantType, grantTypes, issuer, jwkSetUrl, 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_supported
in the resultingOidcProviderConfiguration
, REQUIRED.- Parameters:
subjectType
- the Subject Type that the OpenID Provider supports- Returns:
- the
OidcProviderConfiguration.Builder
for further configuration
-
subjectTypes
AConsumer
of the Subject Types(s) allowing the ability to add, replace, or remove.- Parameters:
subjectTypesConsumer
- aConsumer
of the Subject Types(s)- Returns:
- the
OidcProviderConfiguration.Builder
for further configuration
-
idTokenSigningAlgorithm
Add thisJWS
signing algorithm to the collection ofid_token_signing_alg_values_supported
in the resultingOidcProviderConfiguration
, REQUIRED.- Parameters:
signingAlgorithm
- theJWS
signing algorithm supported for theID Token
- Returns:
- the
OidcProviderConfiguration.Builder
for further configuration
-
idTokenSigningAlgorithms
public OidcProviderConfiguration.Builder idTokenSigningAlgorithms(Consumer<List<String>> signingAlgorithmsConsumer) AConsumer
of theJWS
signing algorithms for theID Token
allowing the ability to add, replace, or remove.- Parameters:
signingAlgorithmsConsumer
- aConsumer
of theJWS
signing algorithms for theID Token
- Returns:
- the
OidcProviderConfiguration.Builder
for further configuration
-
userInfoEndpoint
Use thisuserinfo_endpoint
in the resultingOidcProviderConfiguration
, OPTIONAL.- Parameters:
userInfoEndpoint
- theURL
of the OpenID Connect 1.0 UserInfo Endpoint- Returns:
- the
OidcProviderConfiguration.Builder
for further configuration - Since:
- 0.2.2
-
endSessionEndpoint
Use thisend_session_endpoint
in the resultingOidcProviderConfiguration
, OPTIONAL.- Parameters:
endSessionEndpoint
- theURL
of the OpenID Connect 1.0 End Session Endpoint- Returns:
- the
OidcProviderConfiguration.Builder
for further configuration - Since:
- 1.1
-
build
Validate the claims and build theOidcProviderConfiguration
.The following claims are REQUIRED:
issuer
,authorization_endpoint
,token_endpoint
,jwks_uri
,response_types_supported
,subject_types_supported
andid_token_signing_alg_values_supported
.- Specified by:
build
in classAbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<OidcProviderConfiguration,
OidcProviderConfiguration.Builder> - Returns:
- the
OidcProviderConfiguration
-
validate
protected void validate()
-