Class BaseAuthorizationEndpoint

    • Constructor Detail

      • BaseAuthorizationEndpoint

        public BaseAuthorizationEndpoint()
    • Method Detail

      • handle

        public javax.ws.rs.core.Response handle​(com.authlete.common.api.AuthleteApi api,
                                                AuthorizationRequestHandlerSpi spi,
                                                javax.ws.rs.core.MultivaluedMap<String,​String> parameters)
        Handle an authorization request. This method is an alias of handle(api, spi, parameters, null, null, null).
        Parameters:
        api - An implementation of AuthleteApi.
        spi - An implementation of AuthorizationRequestHandlerSpi.
        parameters - The request parameters of the authorization request.
        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,
                                                AuthorizationRequestHandlerSpi spi,
                                                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)
        Handle an authorization request.

        This method internally creates a AuthorizationRequestHandler instance and calls its handle() method. Then, this method uses the value returned from the handle() method as a response from this method.

        When AuthorizationRequestHandler.handle() method raises a WebApplicationException, this method calls onError() method with the exception. The default implementation of onError() does nothing. 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.

        Parameters:
        api - An implementation of AuthleteApi.
        spi - An implementation of AuthorizationRequestHandlerSpi.
        parameters - The request parameters of the 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 to the client application.
        Since:
        2.82