Class 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 errorURI

    will be returned in the body of the response as per OAuth2 error.

    Created by Jeff Gaynor
    on 9/14/16 at 12:26 PM

    See Also:
    Serialized Form
    • Constructor Detail

      • 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,
                              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,
                              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,
                              URI errorURI,
                              String state)