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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionReturns a newOAuth2AuthorizationRequest.Builder, initialized with the authorization code grant type.from(OAuth2AuthorizationRequest authorizationRequest) Returns a newOAuth2AuthorizationRequest.Builder, initialized with the values from the providedauthorizationRequest.Returns the additional parameter(s) used in the request.<T> 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.Returns the uri for the redirection endpoint.Returns theresponse type.Returns the scope(s).getState()Returns the state.
-
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
Returns the client identifier.- Returns:
- the client identifier
-
getRedirectUri
Returns the uri for the redirection endpoint.- Returns:
- the uri for the redirection endpoint
-
getScopes
Returns the scope(s).- Returns:
- the scope(s), or an empty
Setif not available
-
getState
Returns the state.- Returns:
- the state
-
getAdditionalParameters
Returns the additional parameter(s) used in the request.- Returns:
- a
Mapof the additional parameter(s), or an emptyMapif not available
-
getAttributes
Returns the attribute(s) associated to the request.- Returns:
- a
Mapof the attribute(s), or an emptyMapif not available - Since:
- 5.2
-
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
-
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
-