Package org.forgerock.oauth2.restlet
Class OAuth2RestletException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.forgerock.oauth2.restlet.OAuth2RestletException
-
- All Implemented Interfaces:
Serializable
public class OAuth2RestletException extends Exception
Thrown when a OAuth2 endpoint catches aOAuth2Exception.- Since:
- 12.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OAuth2RestletException(int statusCode, String error, String description, String state)Constructs a new OAuth2RestletException without a redirect uri.OAuth2RestletException(int statusCode, String error, String description, String redirectUri, String state)Constructs a new OAuth2RestletException with a redirect uri.OAuth2RestletException(int statusCode, String error, String description, String redirectUri, String state, OAuth2Constants.UrlLocation parameterLocation)Constructs a new OAuth2RestletException with a redirect uri.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>asMap()Converts the exception into a map of its properties.StringgetError()Gets the error.StringgetErrorDescription()Gets the error description.StringgetErrorUri()Gets the error uri.OAuth2Constants.UrlLocationgetParameterLocation()Gets the location of the parameters in the URL.StringgetRedirectUri()Gets the redirect uri.StringgetState()Gets the state that was on the request.org.restlet.data.StatusgetStatus()Gets the status code.voidsetErrorUri(String errorUri)Sets the error uri.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
OAuth2RestletException
public OAuth2RestletException(int statusCode, String error, String description, String state)Constructs a new OAuth2RestletException without a redirect uri.- Parameters:
statusCode- The status code.error- The error.description- The description.state- The state from the request.
-
OAuth2RestletException
public OAuth2RestletException(int statusCode, String error, String description, String redirectUri, String state)Constructs a new OAuth2RestletException with a redirect uri. TheOAuth2Constants.UrlLocationfor the parameters are defaulted to QUERY.- Parameters:
statusCode- The status code.error- The error.description- The description.redirectUri- The redirect uri from the request.state- The state from the request.
-
OAuth2RestletException
public OAuth2RestletException(int statusCode, String error, String description, String redirectUri, String state, OAuth2Constants.UrlLocation parameterLocation)Constructs a new OAuth2RestletException with a redirect uri.- Parameters:
statusCode- The status code.error- The error.description- The description.redirectUri- The redirect uri from the request.state- The state from the request.
-
-
Method Detail
-
getError
public String getError()
Gets the error.- Returns:
- The error.
-
getErrorDescription
public String getErrorDescription()
Gets the error description.- Returns:
- The error description.
-
getRedirectUri
public String getRedirectUri()
Gets the redirect uri.- Returns:
- The redirect uri.
-
getState
public String getState()
Gets the state that was on the request.- Returns:
- The state.
-
setErrorUri
public void setErrorUri(String errorUri)
Sets the error uri.- Parameters:
errorUri- The error uri.
-
getErrorUri
public String getErrorUri()
Gets the error uri.- Returns:
- The error uri.
-
getStatus
public org.restlet.data.Status getStatus()
Gets the status code.- Returns:
- The status code.
-
getParameterLocation
public OAuth2Constants.UrlLocation getParameterLocation()
Gets the location of the parameters in the URL.- Returns:
- the location of the parameters.
-
-