Class DeviceVerificationRequestHandlerSpiAdapter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getUserCode()
      Get the value of the user code that the end-user input.
      javax.ws.rs.core.Response onExpired()
      Return a response to the end-user when the value of action parameter contained in the response from Authlete /api/device/verification API is EXPIRED, which means the user code has expired.
      javax.ws.rs.core.Response onNotExist()
      Return a response to the end-user when the value of action parameter contained in the response from Authlete /api/device/verification API is NOT_EXIST, which means the user code does not exist.
      javax.ws.rs.core.Response onServerError()
      Return a response to the end-user when the value of action parameter contained in the response from Authlete /api/device/verification API is SERVER_ERROR, which means an error occurred on Authlete side.
      javax.ws.rs.core.Response onValid​(com.authlete.common.dto.DeviceVerificationResponse response)
      Return a response to the end-user when the value of action parameter contained in the response from Authlete /api/device/verification API is VALID, which means the user code exists, has not expired, and belongs to the service.
    • Constructor Detail

      • DeviceVerificationRequestHandlerSpiAdapter

        public DeviceVerificationRequestHandlerSpiAdapter()
    • Method Detail

      • onValid

        public javax.ws.rs.core.Response onValid​(com.authlete.common.dto.DeviceVerificationResponse response)
        Description copied from interface: DeviceVerificationRequestHandlerSpi
        Return a response to the end-user when the value of action parameter contained in the response from Authlete /api/device/verification API is VALID, which means the user code exists, has not expired, and belongs to the service. Typically, the authorization server implementation should interact with the end-user to ask whether she approves or rejects the authorization request from the device.
        Specified by:
        onValid in interface DeviceVerificationRequestHandlerSpi
        Parameters:
        response - A Response from Authlete's /api/device/verification API.
        Returns:
        A response to the end-user.
      • onExpired

        public javax.ws.rs.core.Response onExpired()
        Description copied from interface: DeviceVerificationRequestHandlerSpi
        Return a response to the end-user when the value of action parameter contained in the response from Authlete /api/device/verification API is EXPIRED, which means the user code has expired. Typically, the authorization server implementation should tell the end-user that the user code has expired and urge her to re-initiate a device flow.
        Specified by:
        onExpired in interface DeviceVerificationRequestHandlerSpi
        Returns:
        A response to the end-user.
      • onNotExist

        public javax.ws.rs.core.Response onNotExist()
        Description copied from interface: DeviceVerificationRequestHandlerSpi
        Return a response to the end-user when the value of action parameter contained in the response from Authlete /api/device/verification API is NOT_EXIST, which means the user code does not exist. Typically, the authorization server implementation should tell the end-user that the user code is invalid and urge her to retry to input a valid user code.
        Specified by:
        onNotExist in interface DeviceVerificationRequestHandlerSpi
        Returns:
        A response to the end-user.
      • onServerError

        public javax.ws.rs.core.Response onServerError()
        Description copied from interface: DeviceVerificationRequestHandlerSpi
        Return a response to the end-user when the value of action parameter contained in the response from Authlete /api/device/verification API is SERVER_ERROR, which means an error occurred on Authlete side. Typically, the authorization server implementation should tell the end-user that something wrong happened and urge her to re-initiate a device flow.
        Specified by:
        onServerError in interface DeviceVerificationRequestHandlerSpi
        Returns:
        A response to the end-user.