Skip to content

Commit 5fbb487

Browse files
committed
docs: add text about implicit grant
1 parent 8a92da7 commit 5fbb487

File tree

3 files changed

+41
-19
lines changed

3 files changed

+41
-19
lines changed

docs/api/oauth2-server.rst

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,27 @@ Authorizes a token request.
128128

129129
**Arguments:**
130130

131-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
132-
| Name | Type | Description |
133-
+=========================================+=================+=============================================================================+
134-
| request | :doc:`request` | Request object. |
135-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
136-
| [request.query.allowed=undefined] | String | ``'false'`` to deny the authorization request (see remarks section). |
137-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
138-
| response | :doc:`response` | Response object. |
139-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
140-
| [options={}] | Object | Handler options. |
141-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
142-
| [options.authenticateHandler=undefined] | Object | The authenticate handler (see remarks section). |
143-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
144-
| [options.allowEmptyState=false] | Boolean | Allow clients to specify an empty ``state``. |
145-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
146-
| [options.authorizationCodeLifetime=300] | Number | Lifetime of generated authorization codes in seconds (default = 5 minutes). |
147-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
148-
| [callback=undefined] | Function | Node-style callback to be used instead of the returned ``Promise``. |
149-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
131+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
132+
| Name | Type | Description |
133+
+=========================================+=================+================================================================================+
134+
| request | :doc:`request` | Request object. |
135+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
136+
| [request.query.allowed=undefined] | String | ``'false'`` to deny the authorization request (see remarks section). |
137+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
138+
| response | :doc:`response` | Response object. |
139+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
140+
| [options={}] | Object | Handler options. |
141+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
142+
| [options.authenticateHandler=undefined] | Object | The authenticate handler (see remarks section). |
143+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
144+
| [options.allowEmptyState=false] | Boolean | Allow clients to specify an empty ``state``. |
145+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
146+
| [options.authorizationCodeLifetime=300] | Number | Lifetime of generated authorization codes in seconds (default = 5 minutes). |
147+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
148+
| [options.accessTokenLifetime=3600] | Number | Lifetime of generated implicit grant access token in seconds (default = 1 hr). |
149+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
150+
| [callback=undefined] | Function | Node-style callback to be used instead of the returned ``Promise``. |
151+
+-----------------------------------------+-----------------+--------------------------------------------------------------------------------+
150152

151153
**Return value:**
152154

docs/model/overview.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ Model functions used by the client credentials grant:
5858
- :ref:`Model#getUserFromClient`
5959
- :ref:`Model#saveToken`
6060
- :ref:`Model#validateScope`
61+
--------
62+
63+
.. _ImplicitGrant:
64+
65+
Implicit Grant
66+
------------------------
67+
68+
See :rfc:`Section 4.2 of RFC 6749 <6749#section-4.2>`.
69+
70+
An implicit grant is used to obtain access tokens optimised for public clients known to operate a particular redirection URI. Usually used for browser-based clients implemented in JavaScript.
71+
72+
Model functions used by the implicit grant:
73+
74+
- :ref:`Model#generateAccessToken`
75+
- :ref:`Model#getClient`
76+
- :ref:`Model#saveToken`
77+
- :ref:`Model#validateScope`
6178

6279
--------
6380

docs/model/spec.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ This model function is **required** for all grant types.
399399

400400
- ``authorization_code`` grant
401401
- ``client_credentials`` grant
402+
- ``implicit`` grant
402403
- ``refresh_token`` grant
403404
- ``password`` grant
404405

@@ -553,6 +554,7 @@ This model function is **required** for all grant types.
553554

554555
- ``authorization_code`` grant
555556
- ``client_credentials`` grant
557+
- ``implicit`` grant
556558
- ``refresh_token`` grant
557559
- ``password`` grant
558560

@@ -865,6 +867,7 @@ This model function is **optional**. If not implemented, any scope is accepted.
865867

866868
- ``authorization_code`` grant
867869
- ``client_credentials`` grant
870+
- ``implicit`` grant
868871
- ``password`` grant
869872

870873
**Arguments:**

0 commit comments

Comments
 (0)