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:
Serializable
- See Also:
-
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
ConstructorsConstructorDescriptionOidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, String code, int httpStatus) OidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, String code, int httpStatus, Throwable cause) OidcServerException(String description, String code, int httpStatus) OidcServerException(String description, String code, int httpStatus, Throwable cause) Constructs an instance of this exception with the referenced arguments. -
Method Summary
Modifier and TypeMethodDescriptionReturns the error code associated to this exception.Returns the error description for this exception, as an English string.getErrorDescription(Enumeration<Locale> locales) intReturns the HTTP status code associated to this exception.booleantoJSON()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, getErrorMethods inherited from class com.ibm.oauth.core.api.error.OAuthException
getMsgKey, getObjectsMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OidcServerException
Constructs an instance of this exception with the referenced arguments.- Parameters:
desription- The error description for this exception. Can benullif the code is nullcode- The error code for this exception. Specifynullif the code is unknown.cause- exception causing the problemhttpStatus- The HTTP status code to associate to this exception.
-
OidcServerException
-
OidcServerException
public OidcServerException(com.ibm.ws.security.oauth20.error.impl.BrowserAndServerLogMessage browserServerLogMsg, String code, int httpStatus) -
OidcServerException
-
-
Method Details
-
getErrorDescription
Returns the error description for this exception, as an English string.- Returns:
- The OAuth error description.
-
getErrorDescription
-
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
Constructs an OAuth 2.0 error response from the exception state, per RFC6749 section 5.2.- Returns:
- An error JSON string - never
null.
-