Difference between revisions of "Device flow description"

From i2Rest
Jump to: navigation, search
Line 7: Line 7:
  
  
(A)  The client requests access from the authorization server and
+
#i2Rest client sends a request to the authorization server and includes its client identifier in the request.
        includes its client identifier in the request.
+
#The authorization server responds with a device code, an end-user code and the verification URL.
 +
#i2rest client provides end-user with a device code and the verification URL.
 +
#Now it's time end-user to follow provided verification URL on any capable device. After authentification on authorization server end-user will be prompted to grant (or deny) access to the application.
 +
# i2 rest starts polling authorization server to determine whether the user has authorized your app.
  
Your application sends a request to auth serv <code>OAuth2 authorization endpoint</code> that identifies the scopes that your application will request permission to access.
+
#The authorization server validates the device code provided by the client and responds with the access token if the client is granted access, an error if they are denied access, or an indication that the client should continue to poll.
With obtained on client registration
 
 
 
  (B)  The authorization server issues a device code and an end-user
 
        code and provides the end-user verification URI.
 
The authorization server responds with a device code, end-user code and verification URI, to be shown to end-user.
 
 
 
  (C)  The client instructs the end user to visit the provided end-user verification URI on any capabable device.  The
 
        client provides the user with the end-user code to enter in
 
        order to review the authorization request. .
 
 
 
  (D)  The authorization server authenticates the end user (via the
 
        user agent), and prompts the user to input the user code
 
        provided by the device client.  The authorization server
 
        validates the user code provided by the user, and prompts the
 
        user to accept or decline the request.
 
        The user switches to a device with richer input capabilities, launches a web browser, navigates to the URL displayed in step 3 and enters a code that is also displayed in step 3. The user can then grant (or deny) access to your application.
 
 
 
  (E)  While the end user reviews the client's request (step D), the
 
        client repeatedly polls the authorization server to find out if
 
        the user completed the user authorization step.  The client
 
        includes the device code and its client identifier. Your application starts polling Google's authorization server to determine whether the user has authorized your app.
 
 
 
  (F)  The authorization server validates the device code provided by
 
        the client and responds with the access token if the client is
 
        granted access, an error if they are denied access, or an
 
        indication that the client should continue to poll.
 
  
 
----
 
----
 
[[I2Rest_Client|Back to i2Rest Client]]
 
[[I2Rest_Client|Back to i2Rest Client]]

Revision as of 16:00, 7 April 2020


Device-flow-scheme.png

The flow consists of the following steps:


  1. i2Rest client sends a request to the authorization server and includes its client identifier in the request.
  2. The authorization server responds with a device code, an end-user code and the verification URL.
  3. i2rest client provides end-user with a device code and the verification URL.
  4. Now it's time end-user to follow provided verification URL on any capable device. After authentification on authorization server end-user will be prompted to grant (or deny) access to the application.
  5. i2 rest starts polling authorization server to determine whether the user has authorized your app.
  1. The authorization server validates the device code provided by the client and responds with the access token if the client is granted access, an error if they are denied access, or an indication that the client should continue to poll.

Back to i2Rest Client