Interface DeviceVerificationRequestHandlerSpi

    • Method Summary

      All Methods Instance Methods Abstract 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 info)
      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.
    • Method Detail

      • getUserCode

        String getUserCode()
        Get the value of the user code that the end-user input.
        Returns:
        The value of the user code that the end-user input.
      • onValid

        javax.ws.rs.core.Response onValid​(com.authlete.common.dto.DeviceVerificationResponse info)
        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.
        Parameters:
        info - A Response from Authlete's /api/device/verification API.
        Returns:
        A response to the end-user.
      • onExpired

        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. 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.
        Returns:
        A response to the end-user.
      • onNotExist

        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. 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.
        Returns:
        A response to the end-user.
      • onServerError

        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. Typically, the authorization server implementation should tell the end-user that something wrong happened and urge her to re-initiate a device flow.
        Returns:
        A response to the end-user.