Package com.authlete.jaxrs
Class BaseAuthorizationDecisionEndpoint
- java.lang.Object
-
- com.authlete.jaxrs.BaseEndpoint
-
- com.authlete.jaxrs.BaseAuthorizationDecisionEndpoint
-
public class BaseAuthorizationDecisionEndpoint extends BaseEndpoint
A base class for authorization decision endpoints.- Since:
- 1.2
- Author:
- Takahiko Kawasaki
-
-
Constructor Summary
Constructors Constructor Description BaseAuthorizationDecisionEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Responsehandle(com.authlete.common.api.AuthleteApi api, AuthorizationDecisionHandlerSpi spi, AuthorizationDecisionHandler.Params params)Handle an authorization decision request.javax.ws.rs.core.Responsehandle(com.authlete.common.api.AuthleteApi api, AuthorizationDecisionHandlerSpi spi, AuthorizationDecisionHandler.Params params, com.authlete.common.api.Options authzIssueOptions, com.authlete.common.api.Options authzFailOptions)Handle an authorization decision request.javax.ws.rs.core.Responsehandle(com.authlete.common.api.AuthleteApi api, AuthorizationDecisionHandlerSpi spi, String ticket, String[] claimNames, String[] claimLocales)Handle an authorization decision request.javax.ws.rs.core.Responsehandle(com.authlete.common.api.AuthleteApi api, AuthorizationDecisionHandlerSpi spi, String ticket, String[] claimNames, String[] claimLocales, com.authlete.common.api.Options authzIssueOptions, com.authlete.common.api.Options authzFailOptions)Handle an authorization decision request.-
Methods inherited from class com.authlete.jaxrs.BaseEndpoint
extractClientCertificate, extractClientCertificateChain, extractHeadersAsPairs, onError, takeAttribute
-
-
-
-
Method Detail
-
handle
public 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. This method is an alias ofhandle(api, spi, ticket, claimNames, claimLocales, null, null).- Parameters:
api- An implementation ofAuthleteApi.spi- An implementation ofAuthorizationDecisionHandlerSpi.ticket- A ticket that was issued by Authlete's/api/auth/authorizationAPI.claimNames- Names of requested claims. Use the value of theclaimsparameter in a response from Authlete's/api/auth/authorizationAPI.claimLocales- Requested claim locales. Use the value of theclaimsLocalesparameter in a response from Authlete's/api/auth/authorizationAPI.- Returns:
- A response that should be returned to the client application.
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api, AuthorizationDecisionHandlerSpi spi, String ticket, String[] claimNames, String[] claimLocales, com.authlete.common.api.Options authzIssueOptions, com.authlete.common.api.Options authzFailOptions)Handle an authorization decision request. This method is an alias of thehandle(AuthleteApi, AuthorizationDecisionHandlerSpi, Params, Options, Options)method.- Parameters:
api- An implementation ofAuthleteApi.spi- An implementation ofAuthorizationDecisionHandlerSpi.ticket- A ticket that was issued by Authlete's/api/auth/authorizationAPI.claimNames- Names of requested claims. Use the value of theclaimsparameter in a response from Authlete's/api/auth/authorizationAPI.claimLocales- Requested claim locales. Use the value of theclaimsLocalesparameter in a response from Authlete's/api/auth/authorizationAPI.authzIssueOptions- The request options for the/api/auth/authorization/issueAPI.authzFailOptions- The request options for the/api/auth/authorization/failAPI.- Returns:
- A response that should be returned to the client application.
- Since:
- 2.82
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api, AuthorizationDecisionHandlerSpi spi, AuthorizationDecisionHandler.Params params)Handle an authorization decision request. This method is an alias ofhandle(api, spi, params, null, null).- Parameters:
api- An implementation ofAuthleteApi.spi- An implementation ofAuthorizationDecisionHandlerSpi.params- Parameters necessary to handle the decision.- Returns:
- A response that should be returned to the client application.
- Since:
- 2.26
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api, AuthorizationDecisionHandlerSpi spi, AuthorizationDecisionHandler.Params params, com.authlete.common.api.Options authzIssueOptions, com.authlete.common.api.Options authzFailOptions)Handle an authorization decision request.This method internally creates a
AuthorizationDecisionHandlerinstance and calls itshandle()method. Then, this method uses the value returned from thehandle()method as a response from this method.When
AuthorizationDecisionHandler.handle()method raises aWebApplicationException, this method callsonError()method with the exception. The default implementation ofonError()does nothing. You can override the method as necessary. After callingonError()method, this method callsgetResponse()method of the exception and uses the returned value as a response from this method.- Parameters:
api- An implementation ofAuthleteApi.spi- An implementation ofAuthorizationDecisionHandlerSpi.params- Parameters necessary to handle the decision.authzIssueOptions- The request options for the/api/auth/authorization/issueAPI.authzFailOptions- The request options for the/api/auth/authorization/failAPI.- Returns:
- A response that should be returned to the client application.
- Since:
- 2.82
-
-