Package com.authlete.jaxrs
Class BaseAuthorizationEndpoint
- java.lang.Object
-
- com.authlete.jaxrs.BaseEndpoint
-
- com.authlete.jaxrs.BaseAuthorizationEndpoint
-
public class BaseAuthorizationEndpoint extends BaseEndpoint
A base class for authorization endpoints.- Since:
- 1.2
- Author:
- Takahiko Kawasaki
- See Also:
- RFC 6749, 3.1. Authorization Endpoint, OpenID Connect Core 1.0, 3.1.2. Authorization Endpoint (Authorization Code Flow), OpenID Connect Core 1.0, 3.2.2. Authorization Endpoint (Implicit Flow), OpenID Connect Core 1.0, 3.3.2. Authorization Endpoint (Hybrid Flow)
-
-
Constructor Summary
Constructors Constructor Description BaseAuthorizationEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class com.authlete.jaxrs.BaseEndpoint
extractClientCertificate, extractClientCertificateChain, extractHeadersAsPairs, onError, takeAttribute
-
-
-
-
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 internally creates a
AuthorizationRequestHandler
instance and calls itsAuthorizationRequestHandler.handle(MultivaluedMap)
method. Then, this method uses the value returned from thehandle()
method as a response from this method.When
AuthorizationRequestHandler.handle()
method raises aWebApplicationException
, this method callsonError()
method with the exception. The default implementation ofonError()
does nothing. You can override the method as necessary. After callingonError()
method, this method callsgetResponse()
method of the exception and uses the returned value as a response from this method.- Parameters:
api
- An implementation ofAuthleteApi
.spi
- An implementation ofAuthorizationRequestHandlerSpi
.parameters
- Request parameters of the authorization request.- Returns:
- A response that should be returned to the client application.
-
-