Class OAuth2ErrorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.forgerock.openig.filter.oauth2.client.OAuth2ErrorException
-
- All Implemented Interfaces:
Serializable
public final class OAuth2ErrorException extends Exception
An exception that is thrown when OAuth 2.0 request fails.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OAuth2ErrorException(String error, String errorDescription)
Creates a new exception with the provided OAuth 2.0 error code and optional description.OAuth2ErrorException(String error, String errorDescription, Throwable cause)
Creates a new exception with the provided OAuth 2.0 error code, optional description, and cause.OAuth2ErrorException(OAuth2Error error)
Creates a new exception with the provided OAuth 2.0 error.OAuth2ErrorException(OAuth2Error error, String message)
Creates a new exception with the provided OAuth 2.0 error.OAuth2ErrorException(OAuth2Error error, String message, Throwable cause)
Creates a new exception with the provided OAuth 2.0 error.OAuth2ErrorException(OAuth2Error error, Throwable cause)
Creates a new exception with the provided OAuth 2.0 error.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAuth2Error
getOAuth2Error()
Returns the OAuth 2.0 error represented by this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
OAuth2ErrorException
public OAuth2ErrorException(OAuth2Error error)
Creates a new exception with the provided OAuth 2.0 error.- Parameters:
error
- The OAuth 2.0 error.
-
OAuth2ErrorException
public OAuth2ErrorException(OAuth2Error error, String message)
Creates a new exception with the provided OAuth 2.0 error.- Parameters:
error
- The OAuth 2.0 error.message
- The message.
-
OAuth2ErrorException
public OAuth2ErrorException(OAuth2Error error, String message, Throwable cause)
Creates a new exception with the provided OAuth 2.0 error.- Parameters:
error
- The OAuth 2.0 error.message
- The message.cause
- The cause.
-
OAuth2ErrorException
public OAuth2ErrorException(OAuth2Error error, Throwable cause)
Creates a new exception with the provided OAuth 2.0 error.- Parameters:
error
- The OAuth 2.0 error.cause
- The cause.
-
OAuth2ErrorException
public OAuth2ErrorException(String error, String errorDescription)
Creates a new exception with the provided OAuth 2.0 error code and optional description.- Parameters:
error
- The error code specifying the cause of the failure.errorDescription
- The human-readable ASCII text providing additional information, ornull
.- Throws:
NullPointerException
- Iferror
wasnull
.
-
OAuth2ErrorException
public OAuth2ErrorException(String error, String errorDescription, Throwable cause)
Creates a new exception with the provided OAuth 2.0 error code, optional description, and cause.- Parameters:
error
- The error code specifying the cause of the failure.errorDescription
- The human-readable ASCII text providing additional information, ornull
.cause
- The cause.- Throws:
NullPointerException
- Iferror
wasnull
.
-
-
Method Detail
-
getOAuth2Error
public OAuth2Error getOAuth2Error()
Returns the OAuth 2.0 error represented by this exception.- Returns:
- The OAuth 2.0 error represented by this exception.
-
-