Skip to content

Commit 2221751

Browse files
removed callbacks from docs
1 parent a42dc06 commit 2221751

File tree

5 files changed

+21
-69
lines changed

5 files changed

+21
-69
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If you're using one of those frameworks it is strongly recommended to use the re
2727
## Features
2828

2929
- Supports `authorization_code`, `client_credentials`, `refresh_token` and `password` grant, as well as *extension grants*, with scopes.
30-
- Can be used with *promises*, *Node-style callbacks*, *ES6 generators* and *async*/*await* (using [Babel](https://babeljs.io)).
30+
- Can be used with *promises*, *ES6 generators* and *async*/*await* (using [Babel](https://babeljs.io)).
3131
- Fully [RFC 6749](https://tools.ietf.org/html/rfc6749.html) and [RFC 6750](https://tools.ietf.org/html/rfc6750.html) compliant.
3232
- Implicitly supports any form of storage, e.g. *PostgreSQL*, *MySQL*, *MongoDB*, *Redis*, etc.
3333
- Support for PKCE
@@ -40,7 +40,7 @@ Please leave an issue if something is confusing or missing in the docs.
4040

4141
## Examples
4242

43-
Most users should refer to our [Express (active)](https://github.com/node-oauth/express-oauth-server) or
43+
Most users should refer to our [Express (active)](https://github.com/node-oauth/express-oauth-server) or
4444
[Koa (not maintained by us)](https://github.com/oauthjs/koa-oauth-server/tree/master/examples) examples.
4545

4646
More examples can be found here: https://github.com/14gasher/oauth-example

docs/api/oauth2-server.rst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Advanced example with additional options:
5757

5858
.. _OAuth2Server#authenticate:
5959

60-
``authenticate(request, response, [options], [callback])``
60+
``authenticate(request, response, [options])``
6161
==========================================================
6262

6363
Authenticates a request.
@@ -81,8 +81,6 @@ Authenticates a request.
8181
+------------------------------------------------+-----------------+-----------------------------------------------------------------------+
8282
| [options.allowBearerTokensInQueryString=false] | Boolean | Allow clients to pass bearer tokens in the query string of a request. |
8383
+------------------------------------------------+-----------------+-----------------------------------------------------------------------+
84-
| [callback=undefined] | Function | Node-style callback to be used instead of the returned ``Promise``. |
85-
+------------------------------------------------+-----------------+-----------------------------------------------------------------------+
8684

8785
**Return value:**
8886

@@ -94,8 +92,6 @@ Possible errors include but are not limited to:
9492
:doc:`/api/errors/unauthorized-request-error`:
9593
The protected resource request failed authentication.
9694

97-
The returned ``Promise`` **must** be ignored if ``callback`` is used.
98-
9995
**Remarks:**
10096

10197
::
@@ -121,7 +117,7 @@ The returned ``Promise`` **must** be ignored if ``callback`` is used.
121117

122118
.. _OAuth2Server#authorize:
123119

124-
``authorize(request, response, [options], [callback])``
120+
``authorize(request, response, [options])``
125121
=======================================================
126122

127123
Authorizes a token request.
@@ -145,8 +141,6 @@ Authorizes a token request.
145141
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
146142
| [options.authorizationCodeLifetime=300] | Number | Lifetime of generated authorization codes in seconds (default = 5 minutes). |
147143
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
148-
| [callback=undefined] | Function | Node-style callback to be used instead of the returned ``Promise``. |
149-
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
150144

151145
**Return value:**
152146

@@ -158,8 +152,6 @@ Possible errors include but are not limited to:
158152
:doc:`/api/errors/access-denied-error`
159153
The resource owner denied the access request (i.e. ``request.query.allow`` was ``'false'``).
160154

161-
The returned ``Promise`` **must** be ignored if ``callback`` is used.
162-
163155
**Remarks:**
164156

165157
If ``request.query.allowed`` equals the string ``'false'`` the access request is denied and the returned promise is rejected with an :doc:`/api/errors/access-denied-error`.
@@ -211,7 +203,7 @@ When working with a session-based login mechanism, the handler can simply look l
211203

212204
.. _OAuth2Server#token:
213205

214-
``token(request, response, [options], [callback])``
206+
``token(request, response, [options])``
215207
===================================================
216208

217209
Retrieves a new token for an authorized token request.
@@ -239,8 +231,6 @@ Retrieves a new token for an authorized token request.
239231
+----------------------------------------------+-----------------+-------------------------------------------------------------------------------------------+
240232
| [options.extendedGrantTypes={}] | Object | Additional supported grant types. |
241233
+----------------------------------------------+-----------------+-------------------------------------------------------------------------------------------+
242-
| [callback=undefined] | Function | Node-style callback to be used instead of the returned ``Promise``. |
243-
+----------------------------------------------+-----------------+-------------------------------------------------------------------------------------------+
244234

245235
**Return value:**
246236

@@ -252,8 +242,6 @@ Possible errors include but are not limited to:
252242
:doc:`/api/errors/invalid-grant-error`:
253243
The access token request was invalid or not authorized.
254244

255-
The returned ``Promise`` **must** be ignored if ``callback`` is used.
256-
257245
**Remarks:**
258246

259247
If ``options.allowExtendedTokenAttributes`` is ``true`` any additional properties set on the object returned from :ref:`Model#saveToken() <Model#saveToken>` are copied to the token response sent to the client.

docs/docs/getting-started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Features
2828
========
2929

3030
- Supports :ref:`authorization code <AuthorizationCodeGrant>`, :ref:`client credentials <ClientCredentialsGrant>`, :ref:`refresh token <RefreshTokenGrant>` and :ref:`password <PasswordGrant>` grant, as well as :ref:`extension grants <ExtensionGrants>`, with scopes.
31-
- Can be used with *promises*, *Node-style callbacks*, *ES6 generators* and *async*/*await* (using Babel_).
31+
- Can be used with *promises*, *ES6 generators* and *async*/*await* (using Babel_).
3232
- Fully :rfc:`6749` and :rfc:`6750` compliant.
3333
- Implicitly supports any form of storage, e.g. *PostgreSQL*, *MySQL*, *MongoDB*, *Redis*, etc.
3434
- Complete `test suite`_.

0 commit comments

Comments
 (0)