Package com.ibm.oauth.core.api.error
Class OidcServerException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.ibm.oauth.core.api.error.OAuthException
-
- com.ibm.oauth.core.api.error.oauth20.OAuth20Exception
-
- com.ibm.oauth.core.api.error.OidcServerException
-
- All Implemented Interfaces:
java.io.Serializable
public class OidcServerException extends OAuth20Exception
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.ibm.oauth.core.api.error.oauth20.OAuth20Exception
ACCESS_DENIED, INSUFFICIENT_SCOPE, INVALID_CLIENT, INVALID_GRANT, INVALID_REQUEST, INVALID_SCOPE, INVALID_TOKEN, SERVER_ERROR, TEMPORARILY_UNAVAILABLE, UNAUTHORIZED_CLIENT, UNSUPPORED_GRANT_TPE, UNSUPPORTED_RESPONSE_TPE
-
-
Constructor Summary
Constructors Constructor Description OidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, java.lang.String code, int httpStatus)
OidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, java.lang.String code, int httpStatus, java.lang.Throwable cause)
OidcServerException(java.lang.String description, java.lang.String code, int httpStatus)
OidcServerException(java.lang.String description, java.lang.String code, int httpStatus, java.lang.Throwable cause)
Constructs an instance of this exception with the referenced arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getErrorCode()
Returns the error code associated to this exception.java.lang.String
getErrorDescription()
Returns the error description for this exception, as an English string.java.lang.String
getErrorDescription(java.util.Enumeration<java.util.Locale> locales)
int
getHttpStatus()
Returns the HTTP status code associated to this exception.boolean
isComplete()
java.lang.String
toJSON()
Constructs an OAuth 2.0 error response from the exception state, per RFC6749 section 5.2.-
Methods inherited from class com.ibm.oauth.core.api.error.oauth20.OAuth20Exception
formatSelf, getError
-
Methods inherited from class com.ibm.oauth.core.api.error.OAuthException
getMsgKey, getObjects
-
-
-
-
Constructor Detail
-
OidcServerException
public OidcServerException(java.lang.String description, java.lang.String code, int httpStatus, java.lang.Throwable cause)
Constructs an instance of this exception with the referenced arguments.- Parameters:
desription
- The error description for this exception. Can benull
if the code is nullcode
- The error code for this exception. Specifynull
if the code is unknown.cause
- exception causing the problemhttpStatus
- The HTTP status code to associate to this exception.
-
OidcServerException
public OidcServerException(java.lang.String description, java.lang.String code, int httpStatus)
-
OidcServerException
public OidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, java.lang.String code, int httpStatus)
-
OidcServerException
public OidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, java.lang.String code, int httpStatus, java.lang.Throwable cause)
-
-
Method Detail
-
getErrorDescription
public java.lang.String getErrorDescription()
Returns the error description for this exception, as an English string.- Returns:
- The OAuth error description.
-
getErrorDescription
public java.lang.String getErrorDescription(java.util.Enumeration<java.util.Locale> locales)
-
getErrorCode
public java.lang.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 java.lang.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
.
-
-