Class OAuth2AuthorizationRequest.Builder
java.lang.Object
org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder
- Enclosing class:
- OAuth2AuthorizationRequest
A builder for
OAuth2AuthorizationRequest.-
Method Summary
Modifier and TypeMethodDescriptionadditionalParameters(Consumer<Map<String, Object>> additionalParametersConsumer) AConsumerto be provided access to the additional parameter(s) allowing the ability to add, replace, or remove.additionalParameters(Map<String, Object> additionalParameters) Sets the additional parameter(s) used in the request.attributes(Consumer<Map<String, Object>> attributesConsumer) AConsumerto be provided access to the attribute(s) allowing the ability to add, replace, or remove.attributes(Map<String, Object> attributes) Sets the attributes associated to the request.authorizationRequestUri(String authorizationRequestUri) Sets theURIstring representation of the OAuth 2.0 Authorization Request.authorizationRequestUri(Function<org.springframework.web.util.UriBuilder, URI> authorizationRequestUriFunction) AFunctionto be provided aUriBuilderrepresentation of the OAuth 2.0 Authorization Request allowing for further customizations.authorizationUri(String authorizationUri) Sets the uri for the authorization endpoint.build()Builds a newOAuth2AuthorizationRequest.Sets the client identifier.parameters(Consumer<Map<String, Object>> parametersConsumer) AConsumerto be provided access to all the parameters allowing the ability to add, replace, or remove.redirectUri(String redirectUri) Sets the uri for the redirection endpoint.Sets the scope(s).Sets the scope(s).Sets the state.
-
Method Details
-
authorizationUri
Sets the uri for the authorization endpoint.- Parameters:
authorizationUri- the uri for the authorization endpoint- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
clientId
Sets the client identifier.- Parameters:
clientId- the client identifier- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
redirectUri
Sets the uri for the redirection endpoint.- Parameters:
redirectUri- the uri for the redirection endpoint- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
scope
Sets the scope(s).- Parameters:
scope- the scope(s)- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
scopes
Sets the scope(s).- Parameters:
scopes- the scope(s)- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
state
Sets the state.- Parameters:
state- the state- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
additionalParameters
public OAuth2AuthorizationRequest.Builder additionalParameters(Map<String, Object> additionalParameters) Sets the additional parameter(s) used in the request.- Parameters:
additionalParameters- the additional parameter(s) used in the request- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
additionalParameters
public OAuth2AuthorizationRequest.Builder additionalParameters(Consumer<Map<String, Object>> additionalParametersConsumer) AConsumerto be provided access to the additional parameter(s) allowing the ability to add, replace, or remove.- Parameters:
additionalParametersConsumer- aConsumerof the additional parameters- Since:
- 5.3
-
parameters
public OAuth2AuthorizationRequest.Builder parameters(Consumer<Map<String, Object>> parametersConsumer) AConsumerto be provided access to all the parameters allowing the ability to add, replace, or remove.- Parameters:
parametersConsumer- aConsumerof all the parameters- Since:
- 5.3
-
attributes
Sets the attributes associated to the request.- Parameters:
attributes- the attributes associated to the request- Returns:
- the
OAuth2AuthorizationRequest.Builder - Since:
- 5.2
-
attributes
public OAuth2AuthorizationRequest.Builder attributes(Consumer<Map<String, Object>> attributesConsumer) AConsumerto be provided access to the attribute(s) allowing the ability to add, replace, or remove.- Parameters:
attributesConsumer- aConsumerof the attribute(s)- Since:
- 5.3
-
authorizationRequestUri
Sets theURIstring representation of the OAuth 2.0 Authorization Request.NOTE: The
URIstring is required to be encoded in theapplication/x-www-form-urlencodedMIME format.- Parameters:
authorizationRequestUri- theURIstring representation of the OAuth 2.0 Authorization Request- Returns:
- the
OAuth2AuthorizationRequest.Builder - Since:
- 5.1
-
authorizationRequestUri
public OAuth2AuthorizationRequest.Builder authorizationRequestUri(Function<org.springframework.web.util.UriBuilder, URI> authorizationRequestUriFunction) AFunctionto be provided aUriBuilderrepresentation of the OAuth 2.0 Authorization Request allowing for further customizations.- Parameters:
authorizationRequestUriFunction- aFunctionto be provided aUriBuilderrepresentation of the OAuth 2.0 Authorization Request- Since:
- 5.3
-
build
Builds a newOAuth2AuthorizationRequest.- Returns:
- a
OAuth2AuthorizationRequest
-