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.ObjectA builder forOAuth2AuthorizationRequest.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2AuthorizationRequest.BuilderadditionalParameters(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> additionalParametersConsumer)AConsumerto be provided access to the additional parameter(s) allowing the ability to add, replace, or remove.OAuth2AuthorizationRequest.BuilderadditionalParameters(java.util.Map<java.lang.String,java.lang.Object> additionalParameters)Sets the additional parameter(s) used in the request.OAuth2AuthorizationRequest.Builderattributes(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> attributesConsumer)AConsumerto be provided access to the attribute(s) allowing the ability to add, replace, or remove.OAuth2AuthorizationRequest.Builderattributes(java.util.Map<java.lang.String,java.lang.Object> attributes)Sets the attributes associated to the request.OAuth2AuthorizationRequest.BuilderauthorizationRequestUri(java.lang.String authorizationRequestUri)Sets theURIstring representation of the OAuth 2.0 Authorization Request.OAuth2AuthorizationRequest.BuilderauthorizationRequestUri(java.util.function.Function<org.springframework.web.util.UriBuilder,java.net.URI> authorizationRequestUriFunction)AFunctionto be provided aUriBuilderrepresentation of the OAuth 2.0 Authorization Request allowing for further customizations.OAuth2AuthorizationRequest.BuilderauthorizationUri(java.lang.String authorizationUri)Sets the uri for the authorization endpoint.OAuth2AuthorizationRequestbuild()Builds a newOAuth2AuthorizationRequest.OAuth2AuthorizationRequest.BuilderclientId(java.lang.String clientId)Sets the client identifier.OAuth2AuthorizationRequest.Builderparameters(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.Object>> parametersConsumer)AConsumerto be provided access to all the parameters allowing the ability to add, replace, or remove.OAuth2AuthorizationRequest.BuilderredirectUri(java.lang.String redirectUri)Sets the uri for the redirection endpoint.OAuth2AuthorizationRequest.Builderscope(java.lang.String... scope)Sets the scope(s).OAuth2AuthorizationRequest.Builderscopes(java.util.Set<java.lang.String> scopes)Sets the scope(s).OAuth2AuthorizationRequest.Builderstate(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)
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(java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.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
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)
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
public OAuth2AuthorizationRequest.Builder authorizationRequestUri(java.lang.String 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(java.util.function.Function<org.springframework.web.util.UriBuilder,java.net.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
public OAuth2AuthorizationRequest build()
Builds a newOAuth2AuthorizationRequest.- Returns:
- a
OAuth2AuthorizationRequest
-
-