Class OAuth2Exception
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.forgerock.oauth2.core.exceptions.OAuth2Exception
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AccessDeniedException,AuthorizationDeclinedException,AuthorizationPendingException,BadRequestException,CsrfException,DuplicateRequestParameterException,ExpiredTokenException,InsufficientScopeException,InteractionRequiredException,InvalidClientException,InvalidClientMetadata,InvalidCodeException,InvalidGrantException,InvalidPostLogoutRedirectUri,InvalidRedirectUri,InvalidRequestException,InvalidScopeException,InvalidTokenException,LoginRequiredException,NotFoundException,RedirectUriMismatchException,RelativeRedirectUriException,ResourceOwnerAuthenticationRequired,ResourceOwnerConsentRequiredException,ServerException,UmaException,UnauthorizedClientException,UnsupportedGrantTypeException,UnsupportedResponseTypeException
public abstract class OAuth2Exception extends Exception
Base exception for all OAuth2 exceptions.- Since:
- 12.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OAuth2Exception(int statusCode, String error, String description)Constructs a new OAuth2Exception with specified status code, error and description.OAuth2Exception(int statusCode, String error, String description, OAuth2Constants.UrlLocation parameterLocation)Constructs a new OAuth2Exception with specified status code, error and description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetError()Gets the error/name of the exception.OAuth2Constants.UrlLocationgetParameterLocation()Gets the location of the parameters in the URL.intgetStatusCode()Gets the status code of the exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
OAuth2Exception
public OAuth2Exception(int statusCode, String error, String description)Constructs a new OAuth2Exception with specified status code, error and description. TheOAuth2Constants.UrlLocationfor the parameters are defaulted to QUERY.- Parameters:
statusCode- The status code of the exception. Maps to HTTP status codes.error- The error/name of the exception.description- The reason and description for the exception.
-
OAuth2Exception
public OAuth2Exception(int statusCode, String error, String description, OAuth2Constants.UrlLocation parameterLocation)Constructs a new OAuth2Exception with specified status code, error and description.- Parameters:
statusCode- The status code of the exception. Maps to HTTP status codes.error- The error/name of the exception.description- The reason and description for the exception.parameterLocation- Indicates the location of the parameters in the URL.
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
Gets the status code of the exception.- Returns:
- The status code.
-
getError
public String getError()
Gets the error/name of the exception.- Returns:
- The error.
-
getParameterLocation
public OAuth2Constants.UrlLocation getParameterLocation()
Gets the location of the parameters in the URL.- Returns:
- the location of the parameters.
-
-