Package com.authlete.jaxrs
Class AuthorizationRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.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 theaction
parameter in the response.- Author:
- Takahiko Kawasaki
-
-
Constructor Summary
Constructors Constructor Description AuthorizationRequestHandler(com.authlete.common.api.AuthleteApi api, AuthorizationRequestHandlerSpi spi)
Constructor with an implementation ofAuthleteApi
interface and an implementation ofAuthorizationRequestHandlerSpi
interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCaller
getApiCaller()
javax.ws.rs.core.Response
handle(javax.ws.rs.core.MultivaluedMap<String,String> parameters)
Handle an authorization request to a authorization endpoint of OAuth 2.0 (RFC 6749).protected javax.ws.rs.InternalServerErrorException
unexpected(String message, Throwable cause)
-
-
-
Constructor Detail
-
AuthorizationRequestHandler
public AuthorizationRequestHandler(com.authlete.common.api.AuthleteApi api, AuthorizationRequestHandlerSpi spi)
Constructor with an implementation ofAuthleteApi
interface and an implementation ofAuthorizationRequestHandlerSpi
interface.- Parameters:
api
- Implementation ofAuthleteApi
interface.spi
- Implementation ofAuthorizationRequestHandlerSpi
interface.
-
-
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).- Parameters:
parameters
- 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.
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-