Class AuthorizationDecisionHandler


  • public class AuthorizationDecisionHandler
    extends Object
    Handler for end-user's decision on the authorization request.

    An authorization endpoint returns an authorization page (HTML) to an end-user, and the end-user will select either "authorize" or "deny" the authorization request. This class handles the decision and calls Authlete's /api/auth/authorization/issue API or /api/auth/authorization/fail API accordingly.

    Author:
    Takahiko Kawasaki
    • Method Detail

      • handle

        public javax.ws.rs.core.Response handle​(String ticket,
                                                String[] claimNames,
                                                String[] claimLocales)
                                         throws javax.ws.rs.WebApplicationException
        Handle an end-user's decision on an authorization request.
        Parameters:
        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.
        Returns:
        A response to the client application. Basically, the response will trigger redirection to the client's redirection endpoint.
        Throws:
        javax.ws.rs.WebApplicationException - An error occurred.
      • handle

        public javax.ws.rs.core.Response handle​(AuthorizationDecisionHandler.Params params)
                                         throws javax.ws.rs.WebApplicationException
        Handle an end-user's decision on an authorization request.
        Parameters:
        params - Parameters necessary to handle the decision.
        Returns:
        A response to the client application. Basically, the response will trigger redirection to the client's redirection endpoint.
        Throws:
        javax.ws.rs.WebApplicationException - An error occurred.
        Since:
        2.25
      • getApiCaller

        protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
      • unexpected

        protected javax.ws.rs.InternalServerErrorException unexpected​(String message,
                                                                      Throwable cause)