Skip to content

Docs: Replace code.code with code.authorizationCode (attempt 2) #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions docs/model/spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -326,25 +326,25 @@ This model function is **required** if the ``authorization_code`` grant is used.

An ``Object`` representing the authorization code and associated data.

+--------------------+--------+--------------------------------------------------------------+
| Name | Type | Description |
+====================+========+==============================================================+
| code | Object | The return value. |
+--------------------+--------+--------------------------------------------------------------+
| code.code | String | The authorization code passed to ``getAuthorizationCode()``. |
+--------------------+--------+--------------------------------------------------------------+
| code.expiresAt | Date | The expiry time of the authorization code. |
+--------------------+--------+--------------------------------------------------------------+
| [code.redirectUri] | String | The redirect URI of the authorization code. |
+--------------------+--------+--------------------------------------------------------------+
| [code.scope] | String | The authorized scope of the authorization code. |
+--------------------+--------+--------------------------------------------------------------+
| code.client | Object | The client associated with the authorization code. |
+--------------------+--------+--------------------------------------------------------------+
| code.client.id | String | A unique string identifying the client. |
+--------------------+--------+--------------------------------------------------------------+
| code.user | Object | The user associated with the authorization code. |
+--------------------+--------+--------------------------------------------------------------+
+------------------------+--------+--------------------------------------------------------------+
| Name | Type | Description |
+========================+========+==============================================================+
| code | Object | The return value. |
+------------------------+--------+--------------------------------------------------------------+
| code.authorizationCode | String | The authorization code passed to ``getAuthorizationCode()``. |
+------------------------+--------+--------------------------------------------------------------+
| code.expiresAt | Date | The expiry time of the authorization code. |
+------------------------+--------+--------------------------------------------------------------+
| [code.redirectUri] | String | The redirect URI of the authorization code. |
+------------------------+--------+--------------------------------------------------------------+
| [code.scope] | String | The authorized scope of the authorization code. |
+------------------------+--------+--------------------------------------------------------------+
| code.client | Object | The client associated with the authorization code. |
+------------------------+--------+--------------------------------------------------------------+
| code.client.id | String | A unique string identifying the client. |
+------------------------+--------+--------------------------------------------------------------+
| code.user | Object | The user associated with the authorization code. |
+------------------------+--------+--------------------------------------------------------------+

``code.client`` and ``code.user`` can carry additional properties that will be ignored by *oauth2-server*.

Expand All @@ -364,7 +364,7 @@ An ``Object`` representing the authorization code and associated data.
})
.spread(function(code, client, user) {
return {
code: code.authorization_code,
authorizationCode: code.authorization_code,
expiresAt: code.expires_at,
redirectUri: code.redirect_uri,
scope: code.scope,
Expand Down Expand Up @@ -792,25 +792,25 @@ This model function is **required** if the ``authorization_code`` grant is used.

**Arguments:**

+--------------------+----------+---------------------------------------------------------------------+
| Name | Type | Description |
+====================+==========+=====================================================================+
| code | Object | The return value. |
+--------------------+----------+---------------------------------------------------------------------+
| code.code | String | The authorization code. |
+--------------------+----------+---------------------------------------------------------------------+
| code.expiresAt | Date | The expiry time of the authorization code. |
+--------------------+----------+---------------------------------------------------------------------+
| [code.redirectUri] | String | The redirect URI of the authorization code. |
+--------------------+----------+---------------------------------------------------------------------+
| [code.scope] | String | The authorized scope of the authorization code. |
+--------------------+----------+---------------------------------------------------------------------+
| code.client | Object | The client associated with the authorization code. |
+--------------------+----------+---------------------------------------------------------------------+
| code.client.id | String | A unique string identifying the client. |
+--------------------+----------+---------------------------------------------------------------------+
| code.user | Object | The user associated with the authorization code. |
+--------------------+----------+---------------------------------------------------------------------+
+------------------------+----------+---------------------------------------------------------------------+
| Name | Type | Description |
+========================+==========+=====================================================================+
| code | Object | The code to be revoked. |
+------------------------+----------+---------------------------------------------------------------------+
| code.authorizationCode | String | The authorization code. |
+------------------------+----------+---------------------------------------------------------------------+
| code.expiresAt | Date | The expiry time of the authorization code. |
+------------------------+----------+---------------------------------------------------------------------+
| [code.redirectUri] | String | The redirect URI of the authorization code. |
+------------------------+----------+---------------------------------------------------------------------+
| [code.scope] | String | The authorized scope of the authorization code. |
+------------------------+----------+---------------------------------------------------------------------+
| code.client | Object | The client associated with the authorization code. |
+------------------------+----------+---------------------------------------------------------------------+
| code.client.id | String | A unique string identifying the client. |
+------------------------+----------+---------------------------------------------------------------------+
| code.user | Object | The user associated with the authorization code. |
+------------------------+----------+---------------------------------------------------------------------+

**Return value:**

Expand Down