Class AuthorizationRequestHandler


  • public class AuthorizationRequestHandler
    extends Object
    Handler for authorization requests to a authorization endpoint of OAuth 2.0 (RFC 6749).

    In an implementation of authorization 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/authorization API, receives a response from the API, and dispatches processing according to the action parameter in the response.

    Author:
    Takahiko Kawasaki
    • Method Detail

      • handle

        public javax.ws.rs.core.Response handle​(javax.ws.rs.core.MultivaluedMap<String,​String> parameters)
                                         throws javax.ws.rs.WebApplicationException
        Handle an authorization request to a authorization endpoint of OAuth 2.0 (RFC 6749). This method is an alias of handle(parameters, null, null, null).
        Parameters:
        parameters - The request parameters of an authorization request.
        Returns:
        A response that should be returned from the endpoint to the client application.
        Throws:
        javax.ws.rs.WebApplicationException - An error occurred.
      • handle

        public javax.ws.rs.core.Response handle​(javax.ws.rs.core.MultivaluedMap<String,​String> parameters,
                                                com.authlete.common.api.Options authzOptions,
                                                com.authlete.common.api.Options authzIssueOptions,
                                                com.authlete.common.api.Options authzFailOptions)
                                         throws javax.ws.rs.WebApplicationException
        Handle an authorization request to a authorization endpoint of OAuth 2.0 (RFC 6749).
        Parameters:
        parameters - The request parameters of an authorization request.
        authzOptions - The request options for the /api/auth/authorization API.
        authzIssueOptions - The request options for the /api/auth/authorization/issue API.
        authzFailOptions - The request options for the /api/auth/authorization/fail API.
        Returns:
        A response that should be returned from the endpoint to the client application.
        Throws:
        javax.ws.rs.WebApplicationException - An error occurred.
        Since:
        2.82
      • getApiCaller

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

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