Class DeviceCompleteRequestHandler


  • public class DeviceCompleteRequestHandler
    extends Object
    Handler for processing the result of end-user authentication and authorization in OAuth 2.0 Device Authorization Grant (Device Flow).

    handle() method should be called after the authorization server receives the result of end-user authentication and authorization, or even in the case where the server gave up getting the result for some reasons. The handle() method calls Authlete's /api/device/complete API, receives a response from the API, and dispatches processing according to the action parameter in the response.

    Since:
    2.18
    Author:
    Hideki Ikeda
    • Method Detail

      • handle

        public javax.ws.rs.core.Response handle​(String userCode,
                                                String[] claimNames)
                                         throws javax.ws.rs.WebApplicationException
        Handle the result of end-user authentication and authorization in OAuth 2.0 Device Authorization Grant (Device Flow).
        Parameters:
        userCode - The user code that the end-user input.
        claimNames - Names of requested claims. Use the value of the claimNames parameter in a response from Authlete's /api/device/verification API.
        Returns:
        A response that should be returned to the end-user.
        Throws:
        javax.ws.rs.WebApplicationException - An error occurred.
      • getApiCaller

        protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
      • unexpected

        protected javax.ws.rs.InternalServerErrorException unexpected​(String message,
                                                                      Throwable cause)