1
- Device authorization grant flow
1
+ Part 6 - Device authorization grant flow
2
2
====================================================
3
3
4
4
Scenario
@@ -24,7 +24,7 @@ Fill the form as shown in the screenshot below, and before saving, take note of
24
24
Make sure the client type is set to "Public." There are cases where a confidential client makes sense,
25
25
but generally, it is assumed the device is unable to safely store the client secret.
26
26
27
- .. image :: _images/application-register-device-code.png
27
+ .. image :: ../ _images/application-register-device-code.png
28
28
:alt: Device Authorization application registration
29
29
30
30
Ensure the setting ``OAUTH_DEVICE_VERIFICATION_URI `` is set to a URI you want to return in the
@@ -47,7 +47,7 @@ To initiate device authorization, send this request:
47
47
48
48
curl --location ' http://127.0.0.1:8000/o/device-authorization/' \
49
49
--header ' Content-Type: application/x-www-form-urlencoded' \
50
- --data-urlencode ' client_id={your application\ ' s client id}'
50
+ --data-urlencode ' client_id={your application client id}'
51
51
52
52
The OAuth2 provider will return the following response:
53
53
@@ -63,20 +63,18 @@ The OAuth2 provider will return the following response:
63
63
64
64
Go to `http://127.0.0.1:8000/o/device ` in your browser.
65
65
66
- .. image:: _images/device-enter-code-displayed.png
66
+ .. image :: ../ _images/device-enter-code-displayed.png
67
67
68
68
Enter the code, and it will redirect you to the device-confirm endpoint.
69
69
70
70
Device-confirm endpoint
71
71
-----------------------
72
72
Device polling occurs concurrently while the user approves or denies the request.
73
73
74
- .. image:: _images/device-approve-deny.png
74
+ .. image :: ../ _images/device-approve-deny.png
75
75
76
76
Device polling
77
77
--------------
78
- Note: You should already have the `/token` endpoint implemented in your authorization server before this.
79
-
80
78
Send the following request (in the real world, the device makes this request):
81
79
82
80
.. code-block :: sh
0 commit comments