Package com.authlete.jaxrs
Class RevocationRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.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 theaction
parameter in the response.- Since:
- 1.1
- Author:
- Takahiko Kawasaki
- See Also:
- RFC 7009: OAuth 2.0 Token Revocation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RevocationRequestHandler.Params
Parameters passed to thehandle(Params)
method.
-
Constructor Summary
Constructors Constructor Description RevocationRequestHandler(com.authlete.common.api.AuthleteApi api)
Constructor with an implementation ofAuthleteApi
interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCaller
getApiCaller()
javax.ws.rs.core.Response
handle(RevocationRequestHandler.Params params)
Handle a token revocation request.javax.ws.rs.core.Response
handle(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization)
Handle a token revocation request (RFC 7009).protected javax.ws.rs.InternalServerErrorException
unexpected(String message, Throwable cause)
-
-
-
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 ofAuthorization
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()
-
-