public class OidcTokenExchangeException
extends java.lang.Exception
/oauth2/token
endpoint fails.
Captures the Cognito error code (e.g. invalid_grant) and
the human-readable error description returned in the response body.
| Constructor and Description |
|---|
OidcTokenExchangeException(java.lang.String errorCode,
java.lang.String errorDescription)
Constructs a new OidcTokenExchangeException.
|
OidcTokenExchangeException(java.lang.String message,
java.lang.Throwable cause)
Constructs a new OidcTokenExchangeException with a cause.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getErrorCode()
Returns the OAuth2 error code from Cognito.
|
java.lang.String |
getErrorDescription()
Returns the human-readable error description from Cognito.
|
public OidcTokenExchangeException(@Nonnull
java.lang.String errorCode,
@Nullable
java.lang.String errorDescription)
errorCode - the OAuth2 error code from Cognito (e.g. invalid_grant)errorDescription - the human-readable error description, or nullpublic OidcTokenExchangeException(@Nonnull
java.lang.String message,
@Nonnull
java.lang.Throwable cause)
message - the error messagecause - the underlying cause@CheckReturnValue @Nonnull public java.lang.String getErrorCode()
@CheckReturnValue @Nullable public java.lang.String getErrorDescription()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.