public class BaseAuthorizationDecisionEndpoint extends BaseEndpoint
| Constructor and Description |
|---|
BaseAuthorizationDecisionEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
handle(com.authlete.common.api.AuthleteApi api,
AuthorizationDecisionHandlerSpi spi,
String ticket,
String[] claimNames,
String[] claimLocales)
Handle an authorization decision request.
|
onErrorpublic javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api,
AuthorizationDecisionHandlerSpi spi,
String ticket,
String[] claimNames,
String[] claimLocales)
This method internally creates a AuthorizationDecisionHandler instance and
calls its AuthorizationDecisionHandler.handle(String, String[], String[])
method. Then, this method uses the value returned from the handle() method
as a response from this method.
When AuthorizationDecisionHandler.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 AuthorizationDecisionHandlerSpi.ticket - A ticket that was issued by Authlete's /api/auth/authorization API.claimNames - Names of requested claims. Use the value of the claims
parameter in a response from Authlete's /api/auth/authorization API.claimLocales - Requested claim locales. Use the value of the claimsLocales
parameter in a response from Authlete's /api/auth/authorization API.Copyright © 2016. All rights reserved.