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>
- Type Parameters:
T- the type of objectB- the type of the builder
- 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_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, REQUIRED.abstract Tbuild()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_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.codeChallengeMethod(String codeChallengeMethod) Add this Proof Key for Code Exchange (PKCE)code_challenge_methodto the collection ofcode_challenge_methods_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.codeChallengeMethods(Consumer<List<String>> codeChallengeMethodsConsumer) AConsumerof the Proof Key for Code Exchange (PKCE)code_challenge_methodvalues supported allowing the ability to add, replace, or remove.deviceAuthorizationEndpoint(String deviceAuthorizationEndpoint) Use thisdevice_authorization_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.protected final BgetThis()Add this OAuth 2.0grant_typeto the collection ofgrant_types_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.grantTypes(Consumer<List<String>> grantTypesConsumer) AConsumerof the OAuth 2.0grant_typevalues supported allowing the ability to add, replace, or remove.Use thisissuerin the resultingAbstractOAuth2AuthorizationServerMetadata, REQUIRED.Use thisjwks_uriin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.responseType(String responseType) Add this OAuth 2.0response_typeto the collection ofresponse_types_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, REQUIRED.responseTypes(Consumer<List<String>> responseTypesConsumer) AConsumerof the OAuth 2.0response_typevalues supported allowing the ability to add, replace, or remove.Add this OAuth 2.0scopeto the collection ofscopes_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, RECOMMENDED.AConsumerof the OAuth 2.0scopevalues supported allowing the ability to add, replace, or remove.tlsClientCertificateBoundAccessTokens(boolean tlsClientCertificateBoundAccessTokens) Use thistls_client_certificate_bound_access_tokensin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.tokenEndpoint(String tokenEndpoint) Use thistoken_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, REQUIRED.tokenEndpointAuthenticationMethod(String authenticationMethod) Add this client authentication method to the collection oftoken_endpoint_auth_methods_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.tokenEndpointAuthenticationMethods(Consumer<List<String>> authenticationMethodsConsumer) AConsumerof the client authentication method(s) allowing the ability to add, replace, or remove.tokenIntrospectionEndpoint(String tokenIntrospectionEndpoint) Use thisintrospection_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.tokenIntrospectionEndpointAuthenticationMethod(String authenticationMethod) Add this client authentication method to the collection ofintrospection_endpoint_auth_methods_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.tokenIntrospectionEndpointAuthenticationMethods(Consumer<List<String>> authenticationMethodsConsumer) AConsumerof the client authentication method(s) allowing the ability to add, replace, or remove.tokenRevocationEndpoint(String tokenRevocationEndpoint) Use thisrevocation_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.tokenRevocationEndpointAuthenticationMethod(String authenticationMethod) Add this client authentication method to the collection ofrevocation_endpoint_auth_methods_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.tokenRevocationEndpointAuthenticationMethods(Consumer<List<String>> authenticationMethodsConsumer) AConsumerof the client authentication method(s) allowing the ability to add, replace, or remove.protected voidvalidate()protected static voidvalidateURL(Object url, String errorMessage)
-
Constructor Details
-
AbstractBuilder
protected AbstractBuilder()
-
-
Method Details
-
getClaims
-
getThis
-
issuer
Use thisissuerin the resultingAbstractOAuth2AuthorizationServerMetadata, REQUIRED.- Parameters:
issuer- theURLof the Authorization Server's Issuer Identifier- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
authorizationEndpoint
Use thisauthorization_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, REQUIRED.- Parameters:
authorizationEndpoint- theURLof the OAuth 2.0 Authorization Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
deviceAuthorizationEndpoint
Use thisdevice_authorization_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
deviceAuthorizationEndpoint- theURLof the OAuth 2.0 Device Authorization Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration - Since:
- 1.1
-
tokenEndpoint
Use thistoken_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, REQUIRED.- Parameters:
tokenEndpoint- theURLof the OAuth 2.0 Token Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tokenEndpointAuthenticationMethod
Add this client authentication method to the collection oftoken_endpoint_auth_methods_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
authenticationMethod- the client authentication method supported by the OAuth 2.0 Token Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tokenEndpointAuthenticationMethods
AConsumerof the client authentication method(s) allowing the ability to add, replace, or remove.- Parameters:
authenticationMethodsConsumer- aConsumerof the client authentication method(s) supported by the OAuth 2.0 Token Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
jwkSetUrl
Use thisjwks_uriin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
jwkSetUrl- theURLof the JSON Web Key Set- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
scope
Add this OAuth 2.0scopeto the collection ofscopes_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, RECOMMENDED.- Parameters:
scope- the OAuth 2.0scopevalue supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
scopes
AConsumerof the OAuth 2.0scopevalues supported allowing the ability to add, replace, or remove.- Parameters:
scopesConsumer- aConsumerof the OAuth 2.0scopevalues supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
responseType
Add this OAuth 2.0response_typeto the collection ofresponse_types_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, REQUIRED.- Parameters:
responseType- the OAuth 2.0response_typevalue supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
responseTypes
AConsumerof the OAuth 2.0response_typevalues supported allowing the ability to add, replace, or remove.- Parameters:
responseTypesConsumer- aConsumerof the OAuth 2.0response_typevalues supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
grantType
Add this OAuth 2.0grant_typeto the collection ofgrant_types_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
grantType- the OAuth 2.0grant_typevalue supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
grantTypes
AConsumerof the OAuth 2.0grant_typevalues supported allowing the ability to add, replace, or remove.- Parameters:
grantTypesConsumer- aConsumerof the OAuth 2.0grant_typevalues supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tokenRevocationEndpoint
Use thisrevocation_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
tokenRevocationEndpoint- theURLof the OAuth 2.0 Token Revocation Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tokenRevocationEndpointAuthenticationMethod
Add this client authentication method to the collection ofrevocation_endpoint_auth_methods_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
authenticationMethod- the client authentication method supported by the OAuth 2.0 Token Revocation Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tokenRevocationEndpointAuthenticationMethods
public B tokenRevocationEndpointAuthenticationMethods(Consumer<List<String>> authenticationMethodsConsumer) AConsumerof the client authentication method(s) allowing the ability to add, replace, or remove.- Parameters:
authenticationMethodsConsumer- aConsumerof the client authentication method(s) supported by the OAuth 2.0 Token Revocation Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tokenIntrospectionEndpoint
Use thisintrospection_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
tokenIntrospectionEndpoint- theURLof the OAuth 2.0 Token Introspection Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tokenIntrospectionEndpointAuthenticationMethod
Add this client authentication method to the collection ofintrospection_endpoint_auth_methods_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
authenticationMethod- the client authentication method supported by the OAuth 2.0 Token Introspection Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tokenIntrospectionEndpointAuthenticationMethods
public B tokenIntrospectionEndpointAuthenticationMethods(Consumer<List<String>> authenticationMethodsConsumer) AConsumerof the client authentication method(s) allowing the ability to add, replace, or remove.- Parameters:
authenticationMethodsConsumer- aConsumerof the client authentication method(s) supported by the OAuth 2.0 Token Introspection Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
clientRegistrationEndpoint
Use thisregistration_endpointin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
clientRegistrationEndpoint- theURLof the OAuth 2.0 Dynamic Client Registration Endpoint- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration - Since:
- 0.4.0
-
codeChallengeMethod
Add this Proof Key for Code Exchange (PKCE)code_challenge_methodto the collection ofcode_challenge_methods_supportedin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
codeChallengeMethod- thecode_challenge_methodvalue supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
codeChallengeMethods
AConsumerof the Proof Key for Code Exchange (PKCE)code_challenge_methodvalues supported allowing the ability to add, replace, or remove.- Parameters:
codeChallengeMethodsConsumer- aConsumerof thecode_challenge_methodvalues supported- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
tlsClientCertificateBoundAccessTokens
Use thistls_client_certificate_bound_access_tokensin the resultingAbstractOAuth2AuthorizationServerMetadata, OPTIONAL.- Parameters:
tlsClientCertificateBoundAccessTokens-trueto indicate support for mutual-TLS client certificate-bound access tokens- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration - Since:
- 1.3
-
claim
Use this claim in the resultingAbstractOAuth2AuthorizationServerMetadata.- Parameters:
name- the claim namevalue- the claim value- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configuration
-
claims
Provides access to everyclaim(String, Object)declared so far with the possibility to add, replace, or remove.- Parameters:
claimsConsumer- aConsumerof the claims- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata.AbstractBuilderfor further configurations
-
build
Creates theAbstractOAuth2AuthorizationServerMetadata.- Returns:
- the
AbstractOAuth2AuthorizationServerMetadata
-
validate
protected void validate() -
validateURL
-