Class OidcServerException

All Implemented Interfaces:
Serializable

public class OidcServerException extends OAuth20Exception
See Also:
  • Constructor Details

    • OidcServerException

      public OidcServerException(String description, String code, int httpStatus, Throwable cause)
      Constructs an instance of this exception with the referenced arguments.
      Parameters:
      desription - The error description for this exception. Can be null if the code is null
      code - The error code for this exception. Specify null if the code is unknown.
      cause - exception causing the problem
      httpStatus - The HTTP status code to associate to this exception.
    • OidcServerException

      public OidcServerException(String description, String code, int httpStatus)
    • OidcServerException

      public OidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, String code, int httpStatus)
    • OidcServerException

      public OidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, String code, int httpStatus, Throwable cause)
  • Method Details

    • getErrorDescription

      public String getErrorDescription()
      Returns the error description for this exception, as an English string.
      Returns:
      The OAuth error description.
    • getErrorDescription

      public String getErrorDescription(Enumeration<Locale> locales)
    • getErrorCode

      public String getErrorCode()
      Returns the error code associated to this exception.
      Returns:
      The error code for this exception.
    • getHttpStatus

      public int getHttpStatus()
      Returns the HTTP status code associated to this exception.
      Returns:
      The HTTP status code. Will be -1 if no code was specified.
    • isComplete

      public boolean isComplete()
    • toJSON

      public String toJSON()
      Constructs an OAuth 2.0 error response from the exception state, per RFC6749 section 5.2.
      Returns:
      An error JSON string - never null.