Class OAuth2AuthorizationRequest.Builder
- java.lang.Object
-
- org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest.Builder
-
- Enclosing class:
- OAuth2AuthorizationRequest
public static final class OAuth2AuthorizationRequest.Builder extends java.lang.Object
A builder forOAuth2AuthorizationRequest
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AuthorizationRequest.Builder
additionalParameters(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> additionalParametersConsumer)
AConsumer
to be provided access to the additional parameter(s) allowing the ability to add, replace, or remove.OAuth2AuthorizationRequest.Builder
additionalParameters(java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Sets the additional parameter(s) used in the request.OAuth2AuthorizationRequest.Builder
attributes(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> attributesConsumer)
AConsumer
to be provided access to the attribute(s) allowing the ability to add, replace, or remove.OAuth2AuthorizationRequest.Builder
attributes(java.util.Map<java.lang.String,java.lang.Object> attributes)
Sets the attributes associated to the request.OAuth2AuthorizationRequest.Builder
authorizationRequestUri(java.lang.String authorizationRequestUri)
Sets theURI
string representation of the OAuth 2.0 Authorization Request.OAuth2AuthorizationRequest.Builder
authorizationRequestUri(java.util.function.Function<org.springframework.web.util.UriBuilder,java.net.URI> authorizationRequestUriFunction)
AFunction
to be provided aUriBuilder
representation of the OAuth 2.0 Authorization Request allowing for further customizations.OAuth2AuthorizationRequest.Builder
authorizationUri(java.lang.String authorizationUri)
Sets the uri for the authorization endpoint.OAuth2AuthorizationRequest
build()
Builds a newOAuth2AuthorizationRequest
.OAuth2AuthorizationRequest.Builder
clientId(java.lang.String clientId)
Sets the client identifier.OAuth2AuthorizationRequest.Builder
parameters(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> parametersConsumer)
AConsumer
to be provided access to all the parameters allowing the ability to add, replace, or remove.OAuth2AuthorizationRequest.Builder
redirectUri(java.lang.String redirectUri)
Sets the uri for the redirection endpoint.OAuth2AuthorizationRequest.Builder
scope(java.lang.String... scope)
Sets the scope(s).OAuth2AuthorizationRequest.Builder
scopes(java.util.Set<java.lang.String> scopes)
Sets the scope(s).OAuth2AuthorizationRequest.Builder
state(java.lang.String state)
Sets the state.
-
-
-
Method Detail
-
authorizationUri
public OAuth2AuthorizationRequest.Builder authorizationUri(java.lang.String authorizationUri)
Sets the uri for the authorization endpoint.- Parameters:
authorizationUri
- the uri for the authorization endpoint- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
clientId
public OAuth2AuthorizationRequest.Builder clientId(java.lang.String clientId)
Sets the client identifier.- Parameters:
clientId
- the client identifier- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
redirectUri
public OAuth2AuthorizationRequest.Builder redirectUri(java.lang.String redirectUri)
Sets the uri for the redirection endpoint.- Parameters:
redirectUri
- the uri for the redirection endpoint- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
scope
public OAuth2AuthorizationRequest.Builder scope(java.lang.String... scope)
Sets the scope(s).- Parameters:
scope
- the scope(s)- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
scopes
public OAuth2AuthorizationRequest.Builder scopes(java.util.Set<java.lang.String> scopes)
Sets the scope(s).- Parameters:
scopes
- the scope(s)- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
state
public OAuth2AuthorizationRequest.Builder state(java.lang.String state)
Sets the state.- Parameters:
state
- the state- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
additionalParameters
public OAuth2AuthorizationRequest.Builder additionalParameters(java.util.Map<java.lang.String,java.lang.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(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.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(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.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
public OAuth2AuthorizationRequest.Builder attributes(java.util.Map<java.lang.String,java.lang.Object> 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(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.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
public OAuth2AuthorizationRequest.Builder authorizationRequestUri(java.lang.String 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(java.util.function.Function<org.springframework.web.util.UriBuilder,java.net.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
public OAuth2AuthorizationRequest build()
Builds a newOAuth2AuthorizationRequest
.- Returns:
- a
OAuth2AuthorizationRequest
-
-