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
-
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> T
getAttribute
(String name) Returns the value of an attribute associated to the request.Returns the attribute(s) associated to the request.Returns theURI
string 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
Set
if not available
-
getState
Returns the state.- Returns:
- the state
-
getAdditionalParameters
Returns the additional parameter(s) used in the request.- Returns:
- a
Map
of the additional parameter(s), or an emptyMap
if not available
-
getAttributes
Returns the attribute(s) associated to the request.- Returns:
- a
Map
of the attribute(s), or an emptyMap
if 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
null
if not available - Since:
- 5.2
-
getAuthorizationRequestUri
Returns theURI
string representation of the OAuth 2.0 Authorization Request.NOTE: The
URI
string is encoded in theapplication/x-www-form-urlencoded
MIME format.- Returns:
- the
URI
string 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
-