Class OA2ATException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- edu.uiuc.ncsa.security.core.exceptions.GeneralException
-
- org.oa4mp.delegation.server.OA2GeneralError
-
- org.oa4mp.delegation.server.OA2JSONException
-
- org.oa4mp.delegation.server.OA2ATException
-
- All Implemented Interfaces:
Serializable
public class OA2ATException extends OA2JSONException
This is thrown by the AT servlet and is used to construct the response which must include JSON. Mostly we need this for the type to make sure it can be identified and handled properly. Note the error from the token endpoint is never a redirect to the client's error endpoint, but the response is always a JSON object. The default status code for all of these is 400, bad request, unless the spec. states otherwise.The
will be returned in the body of the response as per OAuth2 error.errorURI
Created by Jeff Gaynor
on 9/14/16 at 12:26 PM- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class edu.uiuc.ncsa.oa4mp.delegation.oa2.OA2GeneralError
client
-
-
Constructor Summary
Constructors Constructor Description OA2ATException(OA2RedirectableError error)
OA2ATException(String error, String description)
Case for very early failure, e.g., invalid client id.OA2ATException(String error, String description, int httpStatus, String state)
Most general exception if something more exotic than error + description + bad request is needed.OA2ATException(String error, String description, int httpStatus, String state, BaseClient client)
OA2ATException(String error, String description, int httpStatus, URI errorURI, String state)
OA2ATException(String error, String description, int httpStatus, URI errorURI, String state, BaseClient client)
OA2ATException(String error, String description, BaseClient client)
OA2ATException(String error, String description, String state)
The vast majority of error from the token endpoint are required by the RFC (section 5.2) to return a bad request (400) http status.OA2ATException(String error, String description, String state, BaseClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URI
getErrorURI()
void
setErrorURI(URI errorURI)
net.sf.json.JSONObject
toJSON()
String
toString()
-
Methods inherited from class edu.uiuc.ncsa.oa4mp.delegation.oa2.OA2JSONException
asJSON
-
Methods inherited from class edu.uiuc.ncsa.oa4mp.delegation.oa2.OA2GeneralError
addStackTraceToFM, addStackTraceToFM, getClient, getDescription, getError, getForensicMessage, getHttpStatus, getState, hasClient, hasForensicMessage, setClient, setDescription, setError, setForensicMessage, setHttpStatus, setState, setValues
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
OA2ATException
public OA2ATException(OA2RedirectableError error)
-
OA2ATException
public OA2ATException(String error, String description)
Case for very early failure, e.g., invalid client id. No way to get the callback, state, etc.- Parameters:
error
-description
-
-
OA2ATException
public OA2ATException(String error, String description, BaseClient client)
-
OA2ATException
public OA2ATException(String error, String description, String state)
The vast majority of error from the token endpoint are required by the RFC (section 5.2) to return a bad request (400) http status.- Parameters:
error
-description
-state
-
-
OA2ATException
public OA2ATException(String error, String description, String state, BaseClient client)
-
OA2ATException
public OA2ATException(String error, String description, int httpStatus, String state)
Most general exception if something more exotic than error + description + bad request is needed.- Parameters:
error
-description
-httpStatus
-state
-
-
OA2ATException
public OA2ATException(String error, String description, int httpStatus, String state, BaseClient client)
-
OA2ATException
public OA2ATException(String error, String description, int httpStatus, URI errorURI, String state)
-
OA2ATException
public OA2ATException(String error, String description, int httpStatus, URI errorURI, String state, BaseClient client)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classOA2GeneralError
-
getErrorURI
public URI getErrorURI()
-
setErrorURI
public void setErrorURI(URI errorURI)
-
toJSON
public net.sf.json.JSONObject toJSON()
- Overrides:
toJSON
in classOA2JSONException
-
-