public final class OAuth2AuthorizationRequest
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
OAuth2AuthorizationRequest.Builder
A builder for
OAuth2AuthorizationRequest . |
Modifier and Type | Method and Description |
---|---|
static OAuth2AuthorizationRequest.Builder |
authorizationCode()
Returns a new
OAuth2AuthorizationRequest.Builder , initialized with the authorization code grant type. |
static OAuth2AuthorizationRequest.Builder |
from(OAuth2AuthorizationRequest authorizationRequest)
Returns a new
OAuth2AuthorizationRequest.Builder , initialized with the values from the provided
authorizationRequest . |
java.util.Map<java.lang.String,java.lang.Object> |
getAdditionalParameters()
Returns the additional parameter(s) used in the request.
|
<T> T |
getAttribute(java.lang.String name)
Returns the value of an attribute associated to the request.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Returns the attribute(s) associated to the request.
|
java.lang.String |
getAuthorizationRequestUri()
Returns the
URI string representation of the OAuth 2.0 Authorization
Request. |
java.lang.String |
getAuthorizationUri()
Returns the uri for the authorization endpoint.
|
java.lang.String |
getClientId()
Returns the client identifier.
|
AuthorizationGrantType |
getGrantType()
Returns the
grant type . |
java.lang.String |
getRedirectUri()
Returns the uri for the redirection endpoint.
|
OAuth2AuthorizationResponseType |
getResponseType()
Returns the
response type . |
java.util.Set<java.lang.String> |
getScopes()
Returns the scope(s).
|
java.lang.String |
getState()
Returns the state.
|
static OAuth2AuthorizationRequest.Builder |
implicit()
Deprecated.
It is not recommended to use the implicit flow due to the inherent
risks of returning access tokens in an HTTP redirect without any confirmation that
it has been received by the client.
|
public java.lang.String getAuthorizationUri()
public AuthorizationGrantType getGrantType()
grant type
.AuthorizationGrantType
public OAuth2AuthorizationResponseType getResponseType()
response type
.OAuth2AuthorizationResponseType
public java.lang.String getClientId()
public java.lang.String getRedirectUri()
public java.util.Set<java.lang.String> getScopes()
Set
if not availablepublic java.lang.String getState()
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalParameters()
Map
of the additional parameter(s), or an empty Map
if
not availablepublic java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Map
of the attribute(s), or an empty Map
if not availablepublic <T> T getAttribute(java.lang.String name)
T
- the type of the attributename
- the name of the attributenull
if
not availablepublic java.lang.String getAuthorizationRequestUri()
URI
string representation of the OAuth 2.0 Authorization
Request.
NOTE: The URI
string is encoded in the
application/x-www-form-urlencoded
MIME format.
URI
string representation of the OAuth 2.0 Authorization
Requestpublic static OAuth2AuthorizationRequest.Builder authorizationCode()
OAuth2AuthorizationRequest.Builder
, initialized with the authorization code grant type.OAuth2AuthorizationRequest.Builder
@Deprecated public static OAuth2AuthorizationRequest.Builder implicit()
OAuth2AuthorizationRequest.Builder
, initialized with the implicit grant type.OAuth2AuthorizationRequest.Builder
public static OAuth2AuthorizationRequest.Builder from(OAuth2AuthorizationRequest authorizationRequest)
OAuth2AuthorizationRequest.Builder
, initialized with the values from the provided
authorizationRequest
.authorizationRequest
- the authorization request used for initializing the
OAuth2AuthorizationRequest.Builder
OAuth2AuthorizationRequest.Builder