Class BaseDeviceVerificationEndpoint


  • public class BaseDeviceVerificationEndpoint
    extends BaseEndpoint
    A base class for device verification endpoints.
    Since:
    2.18
    Author:
    Hideki Ikeda
    • Constructor Detail

      • BaseDeviceVerificationEndpoint

        public BaseDeviceVerificationEndpoint()
    • Method Detail

      • handle

        public javax.ws.rs.core.Response handle​(com.authlete.common.api.AuthleteApi api,
                                                DeviceVerificationRequestHandlerSpi spi)
        Handle a device verification request.

        This method internally creates a DeviceVerificationRequestHandler instance and calls its DeviceVerificationRequestHandler.handle() method. Then, this method uses the value returned from the handle() method as a response from this method.

        When DeviceVerificationRequestHandler.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 DeviceVerificationRequestHandlerSpi.
        Returns:
        A response that should be returned to the end-user.