Class AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<T extends AbstractOAuth2AuthorizationServerMetadata,B extends AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<T,B>>
java.lang.Object
org.springframework.security.oauth2.server.authorization.AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<T,B>
- Direct Known Subclasses:
OAuth2AuthorizationServerMetadata.Builder
,OidcProviderConfiguration.Builder
- Enclosing class:
- AbstractOAuth2AuthorizationServerMetadata
protected abstract static class AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<T extends AbstractOAuth2AuthorizationServerMetadata,B extends AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder<T,B>>
extends Object
A builder for subclasses of
AbstractOAuth2AuthorizationServerMetadata
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorizationEndpoint
(String authorizationEndpoint) Use thisauthorization_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, REQUIRED.abstract T
build()
Creates theAbstractOAuth2AuthorizationServerMetadata
.Use this claim in the resultingAbstractOAuth2AuthorizationServerMetadata
.Provides access to everyclaim(String, Object)
declared so far with the possibility to add, replace, or remove.clientRegistrationEndpoint
(String clientRegistrationEndpoint) Use thisregistration_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.codeChallengeMethod
(String codeChallengeMethod) Add this Proof Key for Code Exchange (PKCE)code_challenge_method
to the collection ofcode_challenge_methods_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.codeChallengeMethods
(Consumer<List<String>> codeChallengeMethodsConsumer) AConsumer
of the Proof Key for Code Exchange (PKCE)code_challenge_method
values supported allowing the ability to add, replace, or remove.protected final B
getThis()
Add this OAuth 2.0grant_type
to the collection ofgrant_types_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.grantTypes
(Consumer<List<String>> grantTypesConsumer) AConsumer
of the OAuth 2.0grant_type
values supported allowing the ability to add, replace, or remove.Use thisissuer
in the resultingAbstractOAuth2AuthorizationServerMetadata
, REQUIRED.Use thisjwks_uri
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.responseType
(String responseType) Add this OAuth 2.0response_type
to the collection ofresponse_types_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, REQUIRED.responseTypes
(Consumer<List<String>> responseTypesConsumer) AConsumer
of the OAuth 2.0response_type
values supported allowing the ability to add, replace, or remove.Add this OAuth 2.0scope
to the collection ofscopes_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, RECOMMENDED.AConsumer
of the OAuth 2.0scope
values supported allowing the ability to add, replace, or remove.tokenEndpoint
(String tokenEndpoint) Use thistoken_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, REQUIRED.tokenEndpointAuthenticationMethod
(String authenticationMethod) Add this client authentication method to the collection oftoken_endpoint_auth_methods_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.tokenEndpointAuthenticationMethods
(Consumer<List<String>> authenticationMethodsConsumer) AConsumer
of the client authentication method(s) allowing the ability to add, replace, or remove.tokenIntrospectionEndpoint
(String tokenIntrospectionEndpoint) Use thisintrospection_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.tokenIntrospectionEndpointAuthenticationMethod
(String authenticationMethod) Add this client authentication method to the collection ofintrospection_endpoint_auth_methods_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.tokenIntrospectionEndpointAuthenticationMethods
(Consumer<List<String>> authenticationMethodsConsumer) AConsumer
of the client authentication method(s) allowing the ability to add, replace, or remove.tokenRevocationEndpoint
(String tokenRevocationEndpoint) Use thisrevocation_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.tokenRevocationEndpointAuthenticationMethod
(String authenticationMethod) Add this client authentication method to the collection ofrevocation_endpoint_auth_methods_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.tokenRevocationEndpointAuthenticationMethods
(Consumer<List<String>> authenticationMethodsConsumer) AConsumer
of the client authentication method(s) allowing the ability to add, replace, or remove.protected void
validate()
protected static void
validateURL
(Object url, String errorMessage)
-
Constructor Details
-
AbstractBuilder
protected AbstractBuilder()
-
-
Method Details
-
getClaims
-
getThis
-
issuer
Use thisissuer
in the resultingAbstractOAuth2AuthorizationServerMetadata
, REQUIRED.- Parameters:
issuer
- theURL
of the Authorization Server's Issuer Identifier- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
authorizationEndpoint
Use thisauthorization_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, REQUIRED.- Parameters:
authorizationEndpoint
- theURL
of the OAuth 2.0 Authorization Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenEndpoint
Use thistoken_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, REQUIRED.- Parameters:
tokenEndpoint
- theURL
of the OAuth 2.0 Token Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenEndpointAuthenticationMethod
Add this client authentication method to the collection oftoken_endpoint_auth_methods_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
authenticationMethod
- the client authentication method supported by the OAuth 2.0 Token Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenEndpointAuthenticationMethods
AConsumer
of the client authentication method(s) allowing the ability to add, replace, or remove.- Parameters:
authenticationMethodsConsumer
- aConsumer
of the client authentication method(s) supported by the OAuth 2.0 Token Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
jwkSetUrl
Use thisjwks_uri
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
jwkSetUrl
- theURL
of the JSON Web Key Set- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
scope
Add this OAuth 2.0scope
to the collection ofscopes_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, RECOMMENDED.- Parameters:
scope
- the OAuth 2.0scope
value supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
scopes
AConsumer
of the OAuth 2.0scope
values supported allowing the ability to add, replace, or remove.- Parameters:
scopesConsumer
- aConsumer
of the OAuth 2.0scope
values supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
responseType
Add this OAuth 2.0response_type
to the collection ofresponse_types_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, REQUIRED.- Parameters:
responseType
- the OAuth 2.0response_type
value supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
responseTypes
AConsumer
of the OAuth 2.0response_type
values supported allowing the ability to add, replace, or remove.- Parameters:
responseTypesConsumer
- aConsumer
of the OAuth 2.0response_type
values supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
grantType
Add this OAuth 2.0grant_type
to the collection ofgrant_types_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
grantType
- the OAuth 2.0grant_type
value supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
grantTypes
AConsumer
of the OAuth 2.0grant_type
values supported allowing the ability to add, replace, or remove.- Parameters:
grantTypesConsumer
- aConsumer
of the OAuth 2.0grant_type
values supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenRevocationEndpoint
Use thisrevocation_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
tokenRevocationEndpoint
- theURL
of the OAuth 2.0 Token Revocation Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenRevocationEndpointAuthenticationMethod
Add this client authentication method to the collection ofrevocation_endpoint_auth_methods_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
authenticationMethod
- the client authentication method supported by the OAuth 2.0 Token Revocation Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenRevocationEndpointAuthenticationMethods
public B tokenRevocationEndpointAuthenticationMethods(Consumer<List<String>> authenticationMethodsConsumer) AConsumer
of the client authentication method(s) allowing the ability to add, replace, or remove.- Parameters:
authenticationMethodsConsumer
- aConsumer
of the client authentication method(s) supported by the OAuth 2.0 Token Revocation Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenIntrospectionEndpoint
Use thisintrospection_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
tokenIntrospectionEndpoint
- theURL
of the OAuth 2.0 Token Introspection Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenIntrospectionEndpointAuthenticationMethod
Add this client authentication method to the collection ofintrospection_endpoint_auth_methods_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
authenticationMethod
- the client authentication method supported by the OAuth 2.0 Token Introspection Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
tokenIntrospectionEndpointAuthenticationMethods
public B tokenIntrospectionEndpointAuthenticationMethods(Consumer<List<String>> authenticationMethodsConsumer) AConsumer
of the client authentication method(s) allowing the ability to add, replace, or remove.- Parameters:
authenticationMethodsConsumer
- aConsumer
of the client authentication method(s) supported by the OAuth 2.0 Token Introspection Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
clientRegistrationEndpoint
Use thisregistration_endpoint
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
clientRegistrationEndpoint
- theURL
of the OAuth 2.0 Dynamic Client Registration Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration - Since:
- 0.4.0
-
codeChallengeMethod
Add this Proof Key for Code Exchange (PKCE)code_challenge_method
to the collection ofcode_challenge_methods_supported
in the resultingAbstractOAuth2AuthorizationServerMetadata
, OPTIONAL.- Parameters:
codeChallengeMethod
- thecode_challenge_method
value supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
codeChallengeMethods
AConsumer
of the Proof Key for Code Exchange (PKCE)code_challenge_method
values supported allowing the ability to add, replace, or remove.- Parameters:
codeChallengeMethodsConsumer
- aConsumer
of thecode_challenge_method
values supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
claim
Use this claim in the resultingAbstractOAuth2AuthorizationServerMetadata
.- Parameters:
name
- the claim namevalue
- the claim value- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configuration
-
claims
Provides access to everyclaim(String, Object)
declared so far with the possibility to add, replace, or remove.- Parameters:
claimsConsumer
- aConsumer
of the claims- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilder
for further configurations
-
build
Creates theAbstractOAuth2AuthorizationServerMetadata
.- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata
-
validate
protected void validate() -
validateURL
-