public class BaseTokenEndpoint extends BaseEndpoint
| Constructor and Description |
|---|
BaseTokenEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
handle(com.authlete.common.api.AuthleteApi api,
TokenRequestHandlerSpi spi,
javax.ws.rs.core.MultivaluedMap<String,String> parameters,
String authorization)
Handle a token request.
|
onErrorpublic javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api,
TokenRequestHandlerSpi spi,
javax.ws.rs.core.MultivaluedMap<String,String> parameters,
String authorization)
This method internally creates a TokenRequestHandler instance and
calls its TokenRequestHandler.handle(MultivaluedMap, String) method.
Then, this method uses the value returned from the handle() method
as a response from this method.
When TokenRequestHandler.handle() method raises a WebApplicationException, this method calls onError() method with the exception. The default implementation of onError()
calls printStackTrace() of the exception and does nothing else. You
can override the method as necessary. After calling onError() method,
this method calls getResponse() method of the exception and uses the
returned value as a response from this method.
api - An implementation of AuthleteApi.spi - An implementation of TokenRequestHandlerSpi.parameters - Request parameters of the token request.authorization - The value of Authorization header of the token request.Copyright © 2016. All rights reserved.