Class BaseBackchannelAuthenticationEndpoint


  • public class BaseBackchannelAuthenticationEndpoint
    extends BaseEndpoint
    A base class for backchannel authentication endpoints of CIBA (Client Initiated Backchannel Authentication).
    Since:
    2.13
    Author:
    Hideki Ikeda
    • Constructor Detail

      • BaseBackchannelAuthenticationEndpoint

        public BaseBackchannelAuthenticationEndpoint()
    • Method Detail

      • handle

        public javax.ws.rs.core.Response handle​(com.authlete.common.api.AuthleteApi api,
                                                BackchannelAuthenticationRequestHandlerSpi spi,
                                                javax.ws.rs.core.MultivaluedMap<String,​String> parameters,
                                                String authorization,
                                                String[] clientCertificatePath)
        Handle a backchannel authentication request in CIBA (Client Initiated Backchannel Authentication) flow.

        This method internally creates a BackchannelAuthenticationRequestHandler instance and calls its BackchannelAuthenticationRequestHandler.handle(MultivaluedMap, String, String[]) method. Then, this method uses the value returned from the handle() method as a response from this method.

        When BackchannelAuthenticationRequestHandler.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 BackchannelAuthenticationRequestHandlerSpi.
        parameters - Request parameters of the backchannel authentication request.
        authorization - The value of Authorization header of the backchannel authentication request.
        clientCertificatePath - The certificate path used in mutual TLS authentication, in PEM format. The client's own certificate is the first in this array. Can be null.
        Returns:
        A response that should be returned to the client application.