public class OAuth2Exception extends RuntimeException
Modifier and Type | Field and Description |
---|---|
static String |
ACCESS_DENIED |
static String |
DESCRIPTION |
static String |
ERROR |
static String |
INSUFFICIENT_SCOPE |
static String |
INVALID_CLIENT |
static String |
INVALID_GRANT |
static String |
INVALID_REQUEST |
static String |
INVALID_SCOPE |
static String |
INVALID_TOKEN |
static String |
REDIRECT_URI_MISMATCH |
static String |
UNAUTHORIZED_CLIENT |
static String |
UNSUPPORTED_GRANT_TYPE |
static String |
UNSUPPORTED_RESPONSE_TYPE |
static String |
URI |
Constructor and Description |
---|
OAuth2Exception(String msg) |
OAuth2Exception(String msg,
Throwable t) |
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalInformation(String key,
String value)
Add some additional information with this OAuth error.
|
static OAuth2Exception |
create(String errorCode,
String errorMessage)
Creates the appropriate subclass of OAuth2Exception given the errorCode.
|
Map<String,String> |
getAdditionalInformation()
Get any additional information associated with this error.
|
int |
getHttpErrorCode()
The HTTP error code associated with this error.
|
String |
getOAuth2ErrorCode()
The OAuth2 error code.
|
String |
getSummary() |
String |
toString() |
static OAuth2Exception |
valueOf(Map<String,String> errorParams)
Creates an
OAuth2Exception from a Map<String,String>. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public static final String ERROR
public static final String DESCRIPTION
public static final String URI
public static final String INVALID_REQUEST
public static final String INVALID_CLIENT
public static final String INVALID_GRANT
public static final String UNAUTHORIZED_CLIENT
public static final String UNSUPPORTED_GRANT_TYPE
public static final String INVALID_SCOPE
public static final String INSUFFICIENT_SCOPE
public static final String INVALID_TOKEN
public static final String REDIRECT_URI_MISMATCH
public static final String UNSUPPORTED_RESPONSE_TYPE
public static final String ACCESS_DENIED
public OAuth2Exception(String msg)
public String getOAuth2ErrorCode()
public int getHttpErrorCode()
public Map<String,String> getAdditionalInformation()
public void addAdditionalInformation(String key, String value)
key
- The key.value
- The value.public static OAuth2Exception create(String errorCode, String errorMessage)
errorCode
- errorMessage
- public static OAuth2Exception valueOf(Map<String,String> errorParams)
OAuth2Exception
from a Map<String,String>.errorParams
- public String getSummary()
Copyright © 2019. All rights reserved.