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) AConsumer
to 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) AConsumer
to 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 theURI
string representation of the OAuth 2.0 Authorization Request.authorizationRequestUri
(Function<org.springframework.web.util.UriBuilder, URI> authorizationRequestUriFunction) AFunction
to be provided aUriBuilder
representation 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) AConsumer
to 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) AConsumer
to be provided access to the additional parameter(s) allowing the ability to add, replace, or remove.- Parameters:
additionalParametersConsumer
- aConsumer
of the additional parameters- Since:
- 5.3
-
parameters
public OAuth2AuthorizationRequest.Builder parameters(Consumer<Map<String, Object>> parametersConsumer) AConsumer
to be provided access to all the parameters allowing the ability to add, replace, or remove.- Parameters:
parametersConsumer
- aConsumer
of 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) AConsumer
to be provided access to the attribute(s) allowing the ability to add, replace, or remove.- Parameters:
attributesConsumer
- aConsumer
of the attribute(s)- Since:
- 5.3
-
authorizationRequestUri
Sets theURI
string representation of the OAuth 2.0 Authorization Request.NOTE: The
URI
string is required to be encoded in theapplication/x-www-form-urlencoded
MIME format.- Parameters:
authorizationRequestUri
- theURI
string 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) AFunction
to be provided aUriBuilder
representation of the OAuth 2.0 Authorization Request allowing for further customizations.- Parameters:
authorizationRequestUriFunction
- aFunction
to be provided aUriBuilder
representation of the OAuth 2.0 Authorization Request- Since:
- 5.3
-
build
Builds a newOAuth2AuthorizationRequest
.- Returns:
- a
OAuth2AuthorizationRequest
-