public final class OAuth2AuthorizationResponse
extends java.lang.Object
OAuth2Error,
Section 4.1.2 Authorization Response| Modifier and Type | Class and Description |
|---|---|
static class |
OAuth2AuthorizationResponse.Builder
A builder for
OAuth2AuthorizationResponse. |
| Modifier and Type | Method and Description |
|---|---|
static OAuth2AuthorizationResponse.Builder |
error(java.lang.String errorCode)
Returns a new
OAuth2AuthorizationResponse.Builder, initialized with the error code. |
java.lang.String |
getCode()
Returns the authorization code.
|
OAuth2Error |
getError()
Returns the
OAuth 2.0 Error if the Authorization Request failed, otherwise null. |
java.lang.String |
getRedirectUri()
Returns the uri where the response was redirected to.
|
java.lang.String |
getState()
Returns the state.
|
boolean |
statusError()
Returns
true if the Authorization Request failed, otherwise false. |
boolean |
statusOk()
Returns
true if the Authorization Request succeeded, otherwise false. |
static OAuth2AuthorizationResponse.Builder |
success(java.lang.String code)
Returns a new
OAuth2AuthorizationResponse.Builder, initialized with the authorization code. |
public java.lang.String getRedirectUri()
public java.lang.String getState()
public java.lang.String getCode()
public OAuth2Error getError()
OAuth 2.0 Error if the Authorization Request failed, otherwise null.OAuth2Error if the Authorization Request failed, otherwise nullpublic boolean statusOk()
true if the Authorization Request succeeded, otherwise false.true if the Authorization Request succeeded, otherwise falsepublic boolean statusError()
true if the Authorization Request failed, otherwise false.true if the Authorization Request failed, otherwise falsepublic static OAuth2AuthorizationResponse.Builder success(java.lang.String code)
OAuth2AuthorizationResponse.Builder, initialized with the authorization code.code - the authorization codeOAuth2AuthorizationResponse.Builderpublic static OAuth2AuthorizationResponse.Builder error(java.lang.String errorCode)
OAuth2AuthorizationResponse.Builder, initialized with the error code.errorCode - the error codeOAuth2AuthorizationResponse.Builder