Skip to content

Commit f2f5ee5

Browse files
committed
docs: remove dead links
1 parent cda26fc commit f2f5ee5

File tree

9 files changed

+21
-24
lines changed

9 files changed

+21
-24
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ First things first:
1010
This project has strong security implications, and we appreciate every help to
1111
improve security.
1212

13-
**However, please read our [security policy](./SECURITY.md), before taking actions.**
13+
**However, please read our [security policy](https://github.com/node-oauth/node-oauth2-server/security/policy),
14+
before taking actions.**
1415

1516

1617

docs/api/grant-types/abstract-grant-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Get scope from the request body.
7979

8080
### abstractGrantType.validateScope(user, client, scope) ⇒ <code>string</code>
8181
Validate requested scope.
82-
Delegates validation to [Model#validateScope](Model#validateScope),
82+
Delegates validation to the Model's `validateScope` method,
8383
if the model implements this method.
8484
Otherwise, treats given scope as valid.
8585

docs/api/handlers/authenticate-handler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
### new AuthenticateHandler(options)
2121
**Throws**:
2222

23-
- <code>InvalidArgumentError</code> if {model} is missing or does not implement [Model#getAccessToken](Model#getAccessToken)
23+
- <code>InvalidArgumentError</code> if {model} is missing or does not implement `getAccessToken`
2424

2525

2626
| Param | Type | Default | Description |

docs/api/server.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const OAuth2Server = require('@node-oauth/oauth2-server');
5454
Authenticates a request.
5555

5656
**Kind**: instance method of [<code>OAuth2Server</code>](#OAuth2Server)
57-
**Returns**: <code>Promise.&lt;object&gt;</code> - A `Promise` that resolves to the access token object returned from [Model#getAccessToken](Model#getAccessToken).
58-
In case of an error, the promise rejects with one of the error types derived from [OAuthError](OAuthError).
57+
**Returns**: <code>Promise.&lt;object&gt;</code> - A `Promise` that resolves to the access token object returned from the model's `getAccessToken`.
58+
In case of an error, the promise rejects with one of the error types derived from `OAuthError`.
5959
**Throws**:
6060

6161
- <code>UnauthorizedRequestError</code> The protected resource request failed authentication.
@@ -92,7 +92,7 @@ function authenticateHandler(options) {
9292
Authorizes a token request.
9393
**Remarks:**
9494

95-
If `request.query.allowed` equals the string `'false'` the access request is denied and the returned promise is rejected with an [AccessDeniedError](AccessDeniedError).
95+
If `request.query.allowed` equals the string `'false'` the access request is denied and the returned promise is rejected with an `AccessDeniedError`.
9696

9797
In order to retrieve the user associated with the request, `options.authenticateHandler` should be supplied.
9898
The `authenticateHandler` has to be an object implementing a `handle(request, response)` function that returns a user object.
@@ -115,8 +115,8 @@ let authenticateHandler = {
115115
```
116116

117117
**Kind**: instance method of [<code>OAuth2Server</code>](#OAuth2Server)
118-
**Returns**: <code>Promise.&lt;object&gt;</code> - A `Promise` that resolves to the authorization code object returned from [Model#saveAuthorizationCode](Model#saveAuthorizationCode)
119-
In case of an error, the promise rejects with one of the error types derived from [OAuthError](OAuthError).
118+
**Returns**: <code>Promise.&lt;object&gt;</code> - A `Promise` that resolves to the authorization code object returned from model's `saveAuthorizationCode`
119+
In case of an error, the promise rejects with one of the error types derived from `OAuthError`.
120120
**Throws**:
121121

122122
- <code>AccessDeniedError</code> The resource owner denied the access request (i.e. `request.query.allow` was `'false'`).
@@ -177,8 +177,8 @@ let options = {
177177
For information on how to implement a handler for a custom grant type see the extension grants.
178178

179179
**Kind**: instance method of [<code>OAuth2Server</code>](#OAuth2Server)
180-
**Returns**: <code>Promise.&lt;object&gt;</code> - A `Promise` that resolves to the token object returned from [Model#saveToken](Model#saveToken).
181-
In case of an error, the promise rejects with one of the error types derived from [OAuthError](OAuthError).
180+
**Returns**: <code>Promise.&lt;object&gt;</code> - A `Promise` that resolves to the token object returned from the model's `saveToken` method.
181+
In case of an error, the promise rejects with one of the error types derived from `OAuthError`.
182182
**Throws**:
183183

184184
- <code>InvalidGrantError</code> The access token request was invalid or not authorized.

docs/guide/getting-started.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,3 @@ DB, Caching) and client management.
9090

9191
Note, that different workflows require different models.
9292
Read the [model overview](./model.md) of what is required for the model in context of specific grant types.
93-
94-
## Next steps
95-
96-
You should get familiar with grant types and t

lib/grant-types/abstract-grant-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class AbstractGrantType {
103103

104104
/**
105105
* Validate requested scope.
106-
* Delegates validation to {@link Model#validateScope},
106+
* Delegates validation to the Model's `validateScope` method,
107107
* if the model implements this method.
108108
* Otherwise, treats given scope as valid.
109109
* @param user {object}

lib/handlers/authenticate-handler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AuthenticateHandler {
2828
* @param [options.addAcceptedScopesHeader=true] {boolean=} Set the `X-Accepted-OAuth-Scopes` HTTP header on response objects.
2929
* @param [options.addAuthorizedScopesHeader=true] {boolean=} Set the `X-OAuth-Scopes` HTTP header on response objects.
3030
* @param [options.allowBearerTokensInQueryString=false] {boolean=} Allow clients to pass bearer tokens in the query string of a request.
31-
* @throws {InvalidArgumentError} if {model} is missing or does not implement {@link Model#getAccessToken}
31+
* @throws {InvalidArgumentError} if {model} is missing or does not implement `getAccessToken`
3232
*/
3333
constructor (options) {
3434
options = options || {};

lib/server.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ class OAuth2Server {
7878
* @param [options.addAuthorizedScopesHeader=true] {boolean=} Set the `X-OAuth-Scopes` HTTP header on response objects.
7979
* @param [options.allowBearerTokensInQueryString=false] {boolean=} Allow clients to pass bearer tokens in the query string of a request.
8080
* @throws {UnauthorizedRequestError} The protected resource request failed authentication.
81-
* @return {Promise.<object>} A `Promise` that resolves to the access token object returned from {@link Model#getAccessToken}.
82-
* In case of an error, the promise rejects with one of the error types derived from {@link OAuthError}.
81+
* @return {Promise.<object>} A `Promise` that resolves to the access token object returned from the model's `getAccessToken`.
82+
* In case of an error, the promise rejects with one of the error types derived from `OAuthError`.
8383
* @example
8484
* const oauth = new OAuth2Server({model: ...});
8585
* function authenticateHandler(options) {
@@ -111,7 +111,7 @@ class OAuth2Server {
111111
* Authorizes a token request.
112112
* **Remarks:**
113113
*
114-
* If `request.query.allowed` equals the string `'false'` the access request is denied and the returned promise is rejected with an {@link AccessDeniedError}.
114+
* If `request.query.allowed` equals the string `'false'` the access request is denied and the returned promise is rejected with an `AccessDeniedError`.
115115
*
116116
* In order to retrieve the user associated with the request, `options.authenticateHandler` should be supplied.
117117
* The `authenticateHandler` has to be an object implementing a `handle(request, response)` function that returns a user object.
@@ -143,8 +143,8 @@ class OAuth2Server {
143143
* @param [options.allowEmptyState=false] {boolean=} Allow clients to specify an empty `state
144144
* @param [options.authorizationCodeLifetime=300] {number=} Lifetime of generated authorization codes in seconds (default = 300 s = 5 min)
145145
* @throws {AccessDeniedError} The resource owner denied the access request (i.e. `request.query.allow` was `'false'`).
146-
* @return {Promise.<object>} A `Promise` that resolves to the authorization code object returned from {@link Model#saveAuthorizationCode}
147-
* In case of an error, the promise rejects with one of the error types derived from {@link OAuthError}.
146+
* @return {Promise.<object>} A `Promise` that resolves to the authorization code object returned from model's `saveAuthorizationCode`
147+
* In case of an error, the promise rejects with one of the error types derived from `OAuthError`.
148148
* @example
149149
* const oauth = new OAuth2Server({model: ...});
150150
* function authorizeHandler(options) {
@@ -203,8 +203,8 @@ class OAuth2Server {
203203
* @param [options.requireClientAuthentication=object] {object|boolean} Require a client secret for grant types (names as keys). Defaults to `true` for all grant types.
204204
* @param [options.alwaysIssueNewRefreshToken=true] {boolean=} Always revoke the used refresh token and issue a new one for the `refresh_token` grant.
205205
* @param [options.extendedGrantTypes=object] {object} Additional supported grant types.
206-
* @return {Promise.<object>} A `Promise` that resolves to the token object returned from {@link Model#saveToken}.
207-
* In case of an error, the promise rejects with one of the error types derived from {@link OAuthError}.
206+
* @return {Promise.<object>} A `Promise` that resolves to the token object returned from the model's `saveToken` method.
207+
* In case of an error, the promise rejects with one of the error types derived from `OAuthError`.
208208
* @throws {InvalidGrantError} The access token request was invalid or not authorized.
209209
* @example
210210
* const oauth = new OAuth2Server({model: ...});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"lint": "npx eslint .",
5353
"lint:fix": "npx eslint . --fix",
5454
"docs:dev": "vitepress dev docs",
55-
"docs:build": "npm run docs:api && vitepress build docs",
55+
"docs:build": "npm run docs:setup && npm run docs:api && vitepress build docs",
5656
"docs:preview": "vitepress preview docs",
5757
"docs:api": "node docs/build-api.js lib docs/api",
5858
"docs:setup": "cd docs/guide && ln -sf ../../CONTRIBUTING.md contributing.md"

0 commit comments

Comments
 (0)