public class TokenRequestHandler extends Object
In an implementation of token endpoint, call handle() method and use the response as the response from the endpoint to the client
application. handle() method calls Authlete's /api/auth/token API,
receives a response from the API, and dispatches processing according to the
action parameter in the response.
| Constructor and Description |
|---|
TokenRequestHandler(com.authlete.common.api.AuthleteApi api,
TokenRequestHandlerSpi spi)
Constructor with an implementation of
AuthleteApi interface
and an implementation of TokenRequestHandlerSpi interface. |
| Modifier and Type | Method and Description |
|---|---|
protected com.authlete.jaxrs.AuthleteApiCaller |
getApiCaller() |
javax.ws.rs.core.Response |
handle(javax.ws.rs.core.MultivaluedMap<String,String> parameters,
String authorization)
Handle a token request to a token endpoint of OAuth 2.0 (RFC 6749).
|
protected javax.ws.rs.InternalServerErrorException |
unexpected(String message,
Throwable cause) |
public TokenRequestHandler(com.authlete.common.api.AuthleteApi api,
TokenRequestHandlerSpi spi)
AuthleteApi interface
and an implementation of TokenRequestHandlerSpi interface.api - Implementation of AuthleteApi interface.spi - Implementation of TokenRequestHandlerSpi interface.public javax.ws.rs.core.Response handle(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization) throws javax.ws.rs.WebApplicationException
parameters - Request parameters of a token request.authorization - The value of Authorization header in the token request.
A client application may embed its pair of client ID and client
secret in a token request using Basic
Authentication.javax.ws.rs.WebApplicationException - An error occurred.protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
Copyright © 2016. All rights reserved.