Class OAuth2AuthorizationRequest
java.lang.Object
org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest
- All Implemented Interfaces:
Serializable
A representation of an OAuth 2.0 Authorization Request for the authorization code grant
type.
- Since:
- 5.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classOAuth2AuthorizationRequest.AbstractBuilder<T extends OAuth2AuthorizationRequest, B extends OAuth2AuthorizationRequest.AbstractBuilder<T,B>> A builder for subclasses ofOAuth2AuthorizationRequest.static classA builder forOAuth2AuthorizationRequest. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionReturns a newOAuth2AuthorizationRequest.Builder, initialized with the authorization code grant type.booleanfrom(OAuth2AuthorizationRequest authorizationRequest) Returns a newOAuth2AuthorizationRequest.Builder, initialized with the values from the providedauthorizationRequest.Returns the additional parameter(s) used in the request.<T> @Nullable TgetAttribute(String name) Returns the value of an attribute associated to the request.Returns the attribute(s) associated to the request.Returns theURIstring representation of the OAuth 2.0 Authorization Request.Returns the uri for the authorization endpoint.Returns the client identifier.Returns thegrant type.@Nullable StringReturns the uri for the redirection endpoint, ornullif not present.Returns theresponse type.Returns the scope(s).@Nullable StringgetState()Returns the state, ornullif not present.inthashCode()
-
Constructor Details
-
OAuth2AuthorizationRequest
-
-
Method Details
-
getAuthorizationUri
Returns the uri for the authorization endpoint.- Returns:
- the uri for the authorization endpoint
-
getGrantType
Returns thegrant type.- Returns:
- the
AuthorizationGrantType
-
getResponseType
Returns theresponse type.- Returns:
- the
OAuth2AuthorizationResponseType
-
getClientId
-
getRedirectUri
Returns the uri for the redirection endpoint, ornullif not present.- Returns:
- the uri for the redirection endpoint, or
null
-
getScopes
-
getState
Returns the state, ornullif not present.- Returns:
- the state, or
null
-
getAdditionalParameters
-
getAttributes
-
getAttribute
Returns the value of an attribute associated to the request.- Type Parameters:
T- the type of the attribute- Parameters:
name- the name of the attribute- Returns:
- the value of the attribute associated to the request, or
nullif not available - Since:
- 5.2
-
getAuthorizationRequestUri
Returns theURIstring representation of the OAuth 2.0 Authorization Request.NOTE: The
URIstring is encoded in theapplication/x-www-form-urlencodedMIME format.- Returns:
- the
URIstring representation of the OAuth 2.0 Authorization Request - Since:
- 5.1
-
authorizationCode
Returns a newOAuth2AuthorizationRequest.Builder, initialized with the authorization code grant type.- Returns:
- the
OAuth2AuthorizationRequest.Builder
-
equals
-
hashCode
-
from
public static OAuth2AuthorizationRequest.Builder from(OAuth2AuthorizationRequest authorizationRequest) Returns a newOAuth2AuthorizationRequest.Builder, initialized with the values from the providedauthorizationRequest.- Parameters:
authorizationRequest- the authorization request used for initializing theOAuth2AuthorizationRequest.Builder- Returns:
- the
OAuth2AuthorizationRequest.Builder - Since:
- 5.1
-