Package com.authlete.jaxrs
Class BackchannelAuthenticationRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.BackchannelAuthenticationRequestHandler
-
public class BackchannelAuthenticationRequestHandler extends Object
Handler for backchannel authentication requests to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication).In an implementation of the backchannel authentication endpoint, call [@link #handle(Params)} method and use the response as the response from the endpoint to the client application. The
handle()method calls Authlete's/backchannel/authenticationAPI, receives a response from the API, and dispatches processing according to theactionparameter in the response.- Since:
- 2.13
- Author:
- Hideki Ikeda
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBackchannelAuthenticationRequestHandler.ParamsParameters passed to thehandle(Params)method.
-
Constructor Summary
Constructors Constructor Description BackchannelAuthenticationRequestHandler(com.authlete.common.api.AuthleteApi api, BackchannelAuthenticationRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofBackchannelAuthenticationRequestHandlerSpiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.Responsehandle(BackchannelAuthenticationRequestHandler.Params params)Handle a backchannel authentication request to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication).javax.ws.rs.core.Responsehandle(BackchannelAuthenticationRequestHandler.Params params, com.authlete.common.api.Options bcAuthOptions, com.authlete.common.api.Options bcAuthIssueOptions, com.authlete.common.api.Options bcAuthFailOptions)Handle a backchannel authentication request to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication).javax.ws.rs.core.Responsehandle(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization, String[] clientCertificatePath)Handle a backchannel authentication request to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication).javax.ws.rs.core.Responsehandle(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization, String[] clientCertificatePath, com.authlete.common.api.Options bcAuthOptions, com.authlete.common.api.Options bcAuthIssueOptions, com.authlete.common.api.Options bcAuthFailOptions)Handle a backchannel authentication request to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication).protected javax.ws.rs.InternalServerErrorExceptionunexpected(String message, Throwable cause)
-
-
-
Constructor Detail
-
BackchannelAuthenticationRequestHandler
public BackchannelAuthenticationRequestHandler(com.authlete.common.api.AuthleteApi api, BackchannelAuthenticationRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofBackchannelAuthenticationRequestHandlerSpiinterface.- Parameters:
api- Implementation ofAuthleteApiinterface.spi- Implementation ofBackchannelAuthenticationRequestHandlerSpiinterface.
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization, String[] clientCertificatePath) throws javax.ws.rs.WebApplicationException
Handle a backchannel authentication request to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication). This method is an alias ofhandle(parameters, authorization, clientCertificatePath, null, null, null).- Parameters:
parameters- The request parameters of a backchannel authentication request.authorization- The value ofAuthorizationheader in the backchannel authentication request. A client application may embed its pair of client ID and client secret in a backchannel authentication request using Basic Authentication.clientCertificatePath- The path of the client's certificate, each in PEM format. The first item in the array is the client's certificate itself. May benullif the client did not send a certificate or path.- 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, String authorization, String[] clientCertificatePath, com.authlete.common.api.Options bcAuthOptions, com.authlete.common.api.Options bcAuthIssueOptions, com.authlete.common.api.Options bcAuthFailOptions) throws javax.ws.rs.WebApplicationException
Handle a backchannel authentication request to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication). This method is an alias of thehandle(Params)method.- Parameters:
parameters- The request parameters of a backchannel authentication request.authorization- The value ofAuthorizationheader in the backchannel authentication request. A client application may embed its pair of client ID and client secret in a backchannel authentication request using Basic Authentication.clientCertificatePath- The path of the client's certificate, each in PEM format. The first item in the array is the client's certificate itself. May benullif the client did not send a certificate or path.bcAuthOptions- The request options for the/api/backchannel/authenticationAPI.bcAuthIssueOptions- The request options for the/api/backchannel/authentication/issueAPI.bcAuthFailOptions- The request options for the/api/backchannel/authentication/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
-
handle
public javax.ws.rs.core.Response handle(BackchannelAuthenticationRequestHandler.Params params)
Handle a backchannel authentication request to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication). This method is an alias ofhandle(params, null, null, null).- Parameters:
params- Parameters for Authlete's/backchannel/authenticationAPI.- Returns:
- A response that should be returned from the endpoint to the client application.
- Since:
- 2.79
-
handle
public javax.ws.rs.core.Response handle(BackchannelAuthenticationRequestHandler.Params params, com.authlete.common.api.Options bcAuthOptions, com.authlete.common.api.Options bcAuthIssueOptions, com.authlete.common.api.Options bcAuthFailOptions)
Handle a backchannel authentication request to a backchannel authentication endpoint of CIBA (Client Initiated Backchannel Authentication).- Parameters:
params- Parameters for Authlete's/backchannel/authenticationAPI.bcAuthOptions- The request options for the/api/backchannel/authenticationAPI.bcAuthIssueOptions- The request options for the/api/backchannel/authentication/issueAPI.bcAuthFailOptions- The request options for the/api/backchannel/authentication/failAPI.- Returns:
- A response that should be returned from the endpoint to the client application.
- Since:
- 2.82
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-