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/authorizationAPI, receives a response from the API, and dispatches processing according to theactionparameter in the response.- Author:
- Takahiko Kawasaki
-
-
Constructor Summary
Constructors Constructor Description AuthorizationRequestHandler(com.authlete.common.api.AuthleteApi api, AuthorizationRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofAuthorizationRequestHandlerSpiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.Responsehandle(javax.ws.rs.core.MultivaluedMap<String,String> parameters)Handle an authorization request to a authorization endpoint of OAuth 2.0 (RFC 6749).javax.ws.rs.core.Responsehandle(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 to a authorization endpoint of OAuth 2.0 (RFC 6749).protected javax.ws.rs.InternalServerErrorExceptionunexpected(String message, Throwable cause)
-
-
-
Constructor Detail
-
AuthorizationRequestHandler
public AuthorizationRequestHandler(com.authlete.common.api.AuthleteApi api, AuthorizationRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofAuthorizationRequestHandlerSpiinterface.- Parameters:
api- Implementation ofAuthleteApiinterface.spi- Implementation ofAuthorizationRequestHandlerSpiinterface.
-
-
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 ofhandle(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/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 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()
-
-