Skip to content

Commit c4eafef

Browse files
committed
docs: fix links and cover missing topics
1 parent 4494564 commit c4eafef

24 files changed

+217
-88
lines changed

docs/api/errors/access-denied-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The resource owner or authorization server denied the request. See :rfc:`Section
66

77
::
88

9-
const AccessDeniedError = require('oauth2-server/lib/errors/access-denied-error');
9+
const AccessDeniedError = require('@node-oauth/oauth2-server/lib/errors/access-denied-error');
1010

1111
--------
1212

docs/api/errors/insufficient-scope-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The request requires higher privileges than provided by the access token. See :r
66

77
::
88

9-
const InsufficientScopeError = require('oauth2-server/lib/errors/insufficient-scope-error');
9+
const InsufficientScopeError = require('@node-oauth/oauth2-server/lib/errors/insufficient-scope-error');
1010

1111
--------
1212

docs/api/errors/invalid-argument-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ An invalid argument was encountered.
66

77
::
88

9-
const InvalidArgumentError = require('oauth2-server/lib/errors/invalid-argument-error');
9+
const InvalidArgumentError = require('@node-oauth/oauth2-server/lib/errors/invalid-argument-error');
1010

1111
.. note:: This error indicates that the module is used incorrectly (i.e., there is a programming error) and should never be seen because of external errors (like invalid data sent by a client).
1212

docs/api/errors/invalid-client-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Client authentication failed (e.g., unknown client, no client authentication inc
66

77
::
88

9-
const InvalidClientError = require('oauth2-server/lib/errors/invalid-client-error');
9+
const InvalidClientError = require('@node-oauth/oauth2-server/lib/errors/invalid-client-error');
1010

1111
--------
1212

docs/api/errors/invalid-grant-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The provided authorization grant (e.g., authorization code, resource owner crede
66

77
::
88

9-
const InvalidGrantError = require('oauth2-server/lib/errors/invalid-grant-error');
9+
const InvalidGrantError = require('@node-oauth/oauth2-server/lib/errors/invalid-grant-error');
1010

1111
--------
1212

docs/api/errors/invalid-request-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The request is missing a required parameter, includes an invalid parameter value
66

77
::
88

9-
const InvalidRequestError = require('oauth2-server/lib/errors/invalid-request-error');
9+
const InvalidRequestError = require('@node-oauth/oauth2-server/lib/errors/invalid-request-error');
1010

1111
--------
1212

docs/api/errors/invalid-scope-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The requested scope is invalid, unknown, or malformed. See :rfc:`Section 4.1.2.1
66

77
::
88

9-
const InvalidScopeError = require('oauth2-server/lib/errors/invalid-scope-error');
9+
const InvalidScopeError = require('@node-oauth/oauth2-server/lib/errors/invalid-scope-error');
1010

1111
--------
1212

docs/api/errors/invalid-token-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The access token provided is expired, revoked, malformed, or invalid for other r
66

77
::
88

9-
const InvalidTokenError = require('oauth2-server/lib/errors/invalid-token-error');
9+
const InvalidTokenError = require('@node-oauth/oauth2-server/lib/errors/invalid-token-error');
1010

1111
--------
1212

docs/api/errors/oauth-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Base class for all errors returned by this module.
66

77
::
88

9-
const OAuthError = require('oauth2-server/lib/errors/oauth-error');
9+
const OAuthError = require('@node-oauth/oauth2-server/lib/errors/oauth-error');
1010

1111
--------
1212

docs/api/errors/server-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The authorization server encountered an unexpected condition that prevented it f
66

77
::
88

9-
const ServerError = require('oauth2-server/lib/errors/server-error');
9+
const ServerError = require('@node-oauth/oauth2-server/lib/errors/server-error');
1010

1111
``ServerError`` is used to wrap unknown exceptions encountered during request processing.
1212

docs/api/errors/unauthorized-client-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The authenticated client is not authorized to use this authorization grant type.
66

77
::
88

9-
const UnauthorizedClientError = require('oauth2-server/lib/errors/unauthorized-client-error');
9+
const UnauthorizedClientError = require('@node-oauth/oauth2-server/lib/errors/unauthorized-client-error');
1010

1111
--------
1212

docs/api/errors/unauthorized-request-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The request lacked any authentication information or the client attempted to use
66

77
::
88

9-
const UnauthorizedRequestError = require('oauth2-server/lib/errors/unauthorized-request-error');
9+
const UnauthorizedRequestError = require('@node-oauth/oauth2-server/lib/errors/unauthorized-request-error');
1010

1111
According to :rfc:`Section 3.1 of RFC 6750 <6750#section-3.1>` you should just fail the request with ``401 Unauthorized`` and not send any error information in the body if this error occurs:
1212

docs/api/errors/unsupported-grant-type-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The authorization grant type is not supported by the authorization server. See :
66

77
::
88

9-
const UnsupportedGrantTypeError = require('oauth2-server/lib/errors/unsupported-grant-type-error');
9+
const UnsupportedGrantTypeError = require('@node-oauth/oauth2-server/lib/errors/unsupported-grant-type-error');
1010

1111
--------
1212

docs/api/errors/unsupported-response-type-error.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The authorization server does not supported obtaining an authorization code usin
66

77
::
88

9-
const UnsupportedResponseTypeError = require('oauth2-server/lib/errors/unsupported-response-type-error');
9+
const UnsupportedResponseTypeError = require('@node-oauth/oauth2-server/lib/errors/unsupported-response-type-error');
1010

1111
--------
1212

docs/api/oauth2-server.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Represents an OAuth2 server instance.
66

77
::
88

9-
const OAuth2Server = require('oauth2-server');
9+
const OAuth2Server = require('@node-oauth/oauth2-server');
1010

1111
--------
1212

@@ -94,7 +94,7 @@ Possible errors include but are not limited to:
9494
:doc:`/api/errors/unauthorized-request-error`:
9595
The protected resource request failed authentication.
9696

97-
The returned ``Promise`` **must** be ignored if ``callback`` is used.
97+
**Versions <=4.x note:** The returned ``Promise`` **must** be ignored if ``callback`` is used.
9898

9999
**Remarks:**
100100

@@ -139,7 +139,7 @@ Authorizes a token request.
139139
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
140140
| [options={}] | Object | Handler options. |
141141
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
142-
| [options.authenticateHandler=undefined] | Object | The authenticate handler (see remarks section). |
142+
| [options.authenticateHandler=undefined] | Object | The authenticate handler (see remarks section below). |
143143
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
144144
| [options.allowEmptyState=false] | Boolean | Allow clients to specify an empty ``state``. |
145145
+-----------------------------------------+-----------------+-----------------------------------------------------------------------------+
@@ -158,7 +158,7 @@ Possible errors include but are not limited to:
158158
:doc:`/api/errors/access-denied-error`
159159
The resource owner denied the access request (i.e. ``request.query.allow`` was ``'false'``).
160160

161-
The returned ``Promise`` **must** be ignored if ``callback`` is used.
161+
**Versions <=4.x note:** The returned ``Promise`` **must** be ignored if ``callback`` is used.
162162

163163
**Remarks:**
164164

@@ -252,7 +252,7 @@ Possible errors include but are not limited to:
252252
:doc:`/api/errors/invalid-grant-error`:
253253
The access token request was invalid or not authorized.
254254

255-
The returned ``Promise`` **must** be ignored if ``callback`` is used.
255+
**Versions <=4.x note:** The returned ``Promise`` **must** be ignored if ``callback`` is used.
256256

257257
**Remarks:**
258258

docs/api/request.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Represents an incoming HTTP request.
66

77
::
88

9-
const Request = require('oauth2-server').Request;
9+
const Request = require('@node-oauth/oauth2-server').Request;
1010

1111
--------
1212

@@ -50,7 +50,7 @@ To convert `Express' request`_ to a ``Request`` simply pass ``req`` as ``options
5050
::
5151

5252
function(req, res, next) {
53-
var request = new Request(req);
53+
let request = new Request(req);
5454
// ...
5555
}
5656

docs/api/response.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Represents an outgoing HTTP response.
66

77
::
88

9-
const Response = require('oauth2-server').Response;
9+
const Response = require('@node-oauth/oauth2-server').Response;
1010

1111
--------
1212

@@ -46,7 +46,7 @@ To convert `Express' response`_ to a ``Response`` simply pass ``res`` as ``optio
4646
::
4747

4848
function(req, res, next) {
49-
var response = new Response(res);
49+
let response = new Response(res);
5050
// ...
5151
}
5252

docs/docs/adapters.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ The *oauth2-server* module is typically not used directly but through one of the
77
.. framework-agnostic but there are several officially supported adapters available for popular HTTP server frameworks such as Express_ and Koa_.
88
99
- express-oauth-server_ for Express_
10-
- koa-oauth-server_ for Koa_
10+
- koa-oauth-server_ for Koa_ (outdated, maintainer wanted!)
1111

12-
.. _express-oauth-server: https://npmjs.org/package/express-oauth-server
12+
.. _express-oauth-server: https://www.npmjs.com/package/@node-oauth/express-oauth-server
1313
.. _Express: https://npmjs.org/package/express
1414
.. _koa-oauth-server: https://npmjs.org/package/koa-oauth-server
1515
.. _Koa: https://npmjs.org/package/koa

docs/docs/getting-started.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Installation
99

1010
oauth2-server_ is available via npm_.
1111

12-
.. _oauth2-server: https://npmjs.org/package/oauth2-server
12+
.. _oauth2-server: https://www.npmjs.com/package/@node-oauth/oauth2-server
1313
.. _npm: https://npmjs.org
1414

1515
.. code-block:: sh
1616
1717
$ npm install oauth2-server
1818
19-
.. note:: The *oauth2-server* module is framework-agnostic but there are several officially supported adapters available for popular HTTP server frameworks such as Express_ and Koa_. If you're using one of those frameworks it is strongly recommended to use the respective adapter module instead of rolling your own.
19+
.. note:: The *oauth2-server* module is framework-agnostic but there are several officially supported adapters available for popular HTTP server frameworks such as Express_ and Koa_ (maintainer wanted!). If you're using one of those frameworks it is strongly recommended to use the respective adapter module instead of rolling your own.
2020

21-
.. _Express: https://npmjs.org/package/express-oauth-server
21+
.. _Express: https://www.npmjs.com/package/@node-oauth/express-oauth-server
2222
.. _Koa: https://npmjs.org/package/koa-oauth-server
2323

2424

@@ -29,12 +29,14 @@ Features
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.
3131
- Can be used with *promises*, *Node-style callbacks*, *ES6 generators* and *async*/*await* (using Babel_).
32+
- From version 5.0.0 fully native async/await implemented
3233
- Fully :rfc:`6749` and :rfc:`6750` compliant.
34+
- Supports PKCE (:rfc:`7636`)
3335
- Implicitly supports any form of storage, e.g. *PostgreSQL*, *MySQL*, *MongoDB*, *Redis*, etc.
3436
- Complete `test suite`_.
3537

3638
.. _Babel: https://babeljs.io
37-
.. _test suite: https://github.com/oauthjs/node-oauth2-server/tree/master/test
39+
.. _test suite: https://github.com/node-oauth/node-oauth2-server/tree/master/test
3840

3941

4042
.. _quick-start:
@@ -46,7 +48,7 @@ Quick Start
4648

4749
::
4850

49-
const OAuth2Server = require('oauth2-server');
51+
const OAuth2Server = require('@node-oauth/oauth2-server');
5052

5153
const oauth = new OAuth2Server({
5254
model: require('./model')
@@ -78,7 +80,7 @@ Quick Start
7880

7981
::
8082

81-
const AccessDeniedError = require('oauth2-server/lib/errors/access-denied-error');
83+
const AccessDeniedError = require('@node-oauth/oauth2-server/lib/errors/access-denied-error');
8284

8385
oauth.authorize(request, response)
8486
.then((code) => {

docs/index.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
oauth2-server_ is a complete, compliant and well tested module for implementing an OAuth2 server in Node.js_. The project is `hosted on GitHub`_ and the included test suite is automatically `run on Travis CI`_.
66

7-
.. _oauth2-server: https://npmjs.org/package/oauth2-server
7+
.. _oauth2-server: https://www.npmjs.com/package/@node-oauth/oauth2-server
88
.. _Node.js: https://nodejs.org
9-
.. _hosted on GitHub: https://github.com/oauthjs/node-oauth2-server
10-
.. _run on Travis CI: https://travis-ci.org/oauthjs/node-oauth2-server
9+
.. _hosted on GitHub: https://github.com/node-oauth/node-oauth2-server
10+
.. _run on GitHub CI: https://github.com/node-oauth/node-oauth2-server/actions
1111

1212
:ref:`installation`
1313

@@ -17,7 +17,7 @@ Example Usage
1717

1818
::
1919

20-
const OAuth2Server = require('oauth2-server');
20+
const OAuth2Server = require('@node-oauth/oauth2-server');
2121
const Request = OAuth2Server.Request;
2222
const Response = OAuth2Server.Response;
2323

@@ -84,5 +84,6 @@ See the :doc:`/model/spec` of what is required from the model passed to :doc:`/a
8484
:hidden:
8585

8686
misc/extension-grants
87+
misc/pkce
8788
misc/migrating-v2-to-v3
8889

docs/misc/extension-grants.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Create a subclass of ``AbstractGrantType`` and create methods `handle` and `save
66

77
.. code-block:: js
88
9-
const OAuth2Server = require('oauth2-server');
9+
const OAuth2Server = require('@node-oauth/oauth2-server');
1010
const AbstractGrantType = OAuth2Server.AbstractGrantType;
1111
const InvalidArgumentError = OAuth2Server.InvalidArgumentError;
1212
const InvalidRequestError = OAuth2Server.InvalidRequestError;

0 commit comments

Comments
 (0)