Class RevocationRequestHandler


  • public class RevocationRequestHandler
    extends Object
    Handler for token revocation requests (RFC 7009).

    In an implementation of revocation endpoint, call handle(Params) method and use the response as the response from the endpoint to the client application. handle() method calls Authlete's /auth/revocation API, receives a response from the API, and dispatches processing according to the action parameter in the response.

    Since:
    1.1
    Author:
    Takahiko Kawasaki
    See Also:
    RFC 7009: OAuth 2.0 Token Revocation
    • Constructor Detail

      • RevocationRequestHandler

        public RevocationRequestHandler​(com.authlete.common.api.AuthleteApi api)
        Constructor with an implementation of AuthleteApi interface.
        Parameters:
        api - Implementation of AuthleteApi interface.
    • Method Detail

      • handle

        public javax.ws.rs.core.Response handle​(javax.ws.rs.core.MultivaluedMap<String,​String> parameters,
                                                String authorization)
                                         throws javax.ws.rs.WebApplicationException
        Handle a token revocation request (RFC 7009).
        Parameters:
        parameters - Request parameters of a token revocation request.
        authorization - The value of Authorization header in the token revocation request. A client application may embed its pair of client ID and client secret in a token revocation request using Basic Authentication.
        Returns:
        A response that should be returned from the endpoint to the client application.
        Throws:
        javax.ws.rs.WebApplicationException - An error occurred.
      • handle

        public javax.ws.rs.core.Response handle​(RevocationRequestHandler.Params params)
                                         throws javax.ws.rs.WebApplicationException
        Handle a token revocation request.
        Parameters:
        params - Parameters for Authlete's /auth/revocation API.
        Returns:
        A response that should be returned from the endpoint to the client application.
        Throws:
        javax.ws.rs.WebApplicationException - An error occurred.
        Since:
        2.79
      • getApiCaller

        protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
      • unexpected

        protected javax.ws.rs.InternalServerErrorException unexpected​(String message,
                                                                      Throwable cause)