@Extensible public class OAuthException extends java.lang.Exception
Exception
which is used to indicate
an error when interfacing with an OAuth 2 extension.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS_DENIED
The access_denied OAuth 2 error code.
|
static java.lang.String |
CONSENT_REQUIRED
The consent_required OAuth 2 error code.
|
static java.lang.String |
INVALID_CLIENT
The invalid_client OAuth 2 error code.
|
static java.lang.String |
INVALID_GRANT
The invalid_grant OAuth 2 error code.
|
static java.lang.String |
INVALID_REQUEST
The invalid_request OAuth 2 error code.
|
static java.lang.String |
INVALID_SCOPE
The invalid_scope OAuth 2 error code.
|
static java.lang.String |
INVALID_TOKEN
The invalid_token OAuth 2 error code.
|
static java.lang.String |
LOGIN_REQUIRED
The login_required OAuth 2 error code.
|
static java.lang.String |
SERVER_ERROR
The server_error OAuth 2 error code.
|
static java.lang.String |
TEMPORARILY_UNAVAILABLE
The temporarily_unavailable OAuth 2 error code.
|
static java.lang.String |
UNAUTHORIZED_CLIENT
The unauthorized_client OAuth 2 error code.
|
static java.lang.String |
UNSUPPORTED_GRANT_TYPE
The unsupported_grant_type OAuth 2 error code.
|
static java.lang.String |
UNSUPPORTED_RESPONSE_TYPE
The unsupported_response_type OAuth 2 error code.
|
Constructor and Description |
---|
OAuthException(java.lang.String oauth2ErrorCode)
Creates a new OAuthException with the provided information.
|
OAuthException(java.lang.String oauth2ErrorCode,
java.lang.String message)
Creates a new OAuthException with the provided information.
|
OAuthException(java.lang.String oauth2ErrorCode,
java.lang.String message,
java.lang.String errorUri,
java.lang.Throwable cause)
Creates a new OAuthException with the provided information.
|
OAuthException(java.lang.String oauth2ErrorCode,
java.lang.Throwable cause)
Creates a new OAuthException with the provided information.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorUri()
Retrieves the URI identifying a web page with information about the error
or
null if not available. |
java.lang.String |
getOauth2ErrorCode()
Retrieves the OAuth 2 error code that should be returned to the client
application.
|
public static final java.lang.String ACCESS_DENIED
public static final java.lang.String CONSENT_REQUIRED
public static final java.lang.String INVALID_CLIENT
public static final java.lang.String INVALID_GRANT
public static final java.lang.String INVALID_REQUEST
public static final java.lang.String INVALID_SCOPE
public static final java.lang.String INVALID_TOKEN
public static final java.lang.String LOGIN_REQUIRED
public static final java.lang.String SERVER_ERROR
public static final java.lang.String TEMPORARILY_UNAVAILABLE
public static final java.lang.String UNAUTHORIZED_CLIENT
public static final java.lang.String UNSUPPORTED_GRANT_TYPE
public static final java.lang.String UNSUPPORTED_RESPONSE_TYPE
public OAuthException(java.lang.String oauth2ErrorCode)
oauth2ErrorCode
- The OAuth 2 error code that should be returned
to the client application.public OAuthException(java.lang.String oauth2ErrorCode, java.lang.String message)
oauth2ErrorCode
- The OAuth 2 error code that should be returned
to the client application.message
- The message that explains the problem that
occurred.public OAuthException(java.lang.String oauth2ErrorCode, java.lang.Throwable cause)
oauth2ErrorCode
- The OAuth 2 error code that should be returned
to the client application.cause
- The underlying cause that triggered this
exception.public OAuthException(java.lang.String oauth2ErrorCode, java.lang.String message, java.lang.String errorUri, java.lang.Throwable cause)
oauth2ErrorCode
- The OAuth 2 error code that should be returned
to the client application.message
- The message that explains the problem that
occurred.errorUri
- A URI identifying a web page with information
about the error.cause
- The underlying cause that triggered this
exception.public java.lang.String getOauth2ErrorCode()
public java.lang.String getErrorUri()
null
if not available.null
if not available.