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:
  • Constructor Details

    • 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, or null.
      Throws:
      NullPointerException - If error was null.
    • 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, or null.
      cause - The cause.
      Throws:
      NullPointerException - If error was null.
  • Method Details

    • getOAuth2Error

      public OAuth2Error getOAuth2Error()
      Returns the OAuth 2.0 error represented by this exception.
      Returns:
      The OAuth 2.0 error represented by this exception.