Skip to content

Commit 2806d75

Browse files
authored
docs: fix typos (#448)
1 parent 6d95d67 commit 2806d75

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

API.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# API
22

3-
Node.js client library for [OAuth2](http://oauth.net/2/). OAuth2 allows users to grant access to restricted resources by third party applications, giving them the possibility to enable and disable those accesses whenever they want.
3+
Node.js client library for [OAuth2](http://oauth.net/2/). OAuth2 allows users to grant access to restricted resources by third-party applications, giving them the possibility to enable and disable those accesses whenever they want.
44

55
## Options
66

@@ -14,18 +14,18 @@ Simple OAuth2 grant classes accept an object with the following params.
1414

1515
* `auth` - required object with the following properties:
1616
* `tokenHost` - Base URL used to obtain access tokens. Required
17-
* `tokenPath` - URL path to obtain access tokens (See [url resolution notes](#url-resolution)). Defaults to **/oauth/token**
18-
* `refreshPath` - URL path to refresh access tokens (See [url resolution notes](#url-resolution)). Defaults to `auth.tokenPath`
19-
* `revokePath` - URL path to revoke access tokens (See [url resolution notes](#url-resolution)). Defaults to **/oauth/revoke**
17+
* `tokenPath` - URL path to obtain access tokens (See [URL resolution notes](#url-resolution)). Defaults to **/oauth/token**
18+
* `refreshPath` - URL path to refresh access tokens (See [URL resolution notes](#url-resolution)). Defaults to `auth.tokenPath`
19+
* `revokePath` - URL path to revoke access tokens (See [URL resolution notes](#url-resolution)). Defaults to **/oauth/revoke**
2020
* `authorizeHost` - Base URL used to request an *authorization code*. Only valid for *AuthorizationCode*. Defaults to `auth.tokenHost` value
21-
* `authorizePath` - URL path to request an *authorization code* (See [url resolution notes](#url-resolution)). Only valid for *AuthorizationCode*. Defaults to **/oauth/authorize**
21+
* `authorizePath` - URL path to request an *authorization code* (See [URL resolution notes](#url-resolution)). Only valid for *AuthorizationCode*. Defaults to **/oauth/authorize**
2222

2323
* `http` optional object used to set default options to the internal http library ([wreck](https://github.com/hapijs/wreck)). All options except **baseUrl** are allowed
2424
* `json`: JSON response parsing mode. Defaults to **strict**
2525
* `redirects` Number or redirects to follow. Defaults to **false** (no redirects)
2626
* `headers` Http headers
27-
* `accept` Acceptable http response content type. Defaults to **application/json**
28-
* `authorization` Always overriden by the library to properly send the required credentials on each scenario
27+
* `accept` Acceptable http response content-type. Defaults to **application/json**
28+
* `authorization` Always overridden by the library to properly send the required credentials on each scenario
2929

3030
* `options` additional options to setup how the module perform requests
3131
* `scopeSeparator` Scope separator character. Some providers may require a different separator. Defaults to **empty space**
@@ -45,7 +45,7 @@ Creates the authorization URL from the *client configuration* and the *authorize
4545

4646
* `redirectURI` String representing the registered application URI where the user is redirected after authentication
4747
* `scope` String or array of strings representing the application privileges
48-
* `state` String representing an opaque value used by the client to main the state between the request and the callback
48+
* `state` String representing an opaque value used by the client to maintain the state between the request and the callback
4949

5050
Additional options will be automatically serialized as query params in the resulting URL.
5151

@@ -59,7 +59,7 @@ Get a new access token using the current grant type.
5959

6060
Additional options will be automatically serialized as params for the token request.
6161

62-
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overriden as documented by the module `http` options.
62+
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overridden as documented by the module `http` options.
6363

6464
#### .createToken(token) => AccessToken
6565
Creates a new access token by providing a token object as specified by [RFC6750](https://tools.ietf.org/html/rfc6750#section-4).
@@ -77,7 +77,7 @@ Get a new access token using the current grant type.
7777

7878
Additional options will be automatically serialized as params for the token request.
7979

80-
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overriden as documented by the module `http` options.
80+
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overridden as documented by the module `http` options.
8181

8282
#### .createToken(token) => AccessToken
8383
Creates a new access token by providing a token object as specified by [RFC6750](https://tools.ietf.org/html/rfc6750#section-4).
@@ -93,7 +93,7 @@ Get a new access token using the current grant type.
9393

9494
Additional options will be automatically serialized as params for the token request.
9595

96-
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overriden as documented by the module `http` options.
96+
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overridden as documented by the module `http` options.
9797

9898
#### .createToken(token) => AccessToken
9999
Creates a new access token by providing a token object as specified by [RFC6750](https://tools.ietf.org/html/rfc6750#section-4).
@@ -109,21 +109,21 @@ Refreshes the current access token. The following params are allowed:
109109

110110
* `params`
111111
* `[scope]` Optional string or array including a subset of the original token scopes to request
112-
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overriden as documented by the module `http` options.
112+
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overridden as documented by the module `http` options.
113113

114114
Additional options will be automatically serialized as query params for the token request.
115115

116116
#### await .revoke(tokenType, [httpOptions])
117117
Revokes either the access or refresh token depending on the {tokenType} value. Token type can be one of: `access_token` or `refresh_token`.
118118

119-
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overriden as documented by the module `http` options.
119+
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overridden as documented by the module `http` options.
120120

121121
#### await .revokeAll([httpOptions])
122122
Revokes both the current access and refresh tokens
123123

124-
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overriden as documented by the module `http` options.
124+
* `httpOptions` All [wreck](https://github.com/hapijs/wreck) options can be overridden as documented by the module `http` options.
125125

126126
#### .token
127127
Immutable object containing the token object provided while constructing a new access token instance. This property will usually have the schema as specified by [RFC6750](https://tools.ietf.org/html/rfc6750#section-4), but the exact properties may vary between authorization servers.
128128

129-
Please also note, that the current implementation will always add an **expires_at** property regardless of the authorization server response, as we require it to to provide the refresh token functionality.
129+
Please also note that the current implementation will always add an **expires_at** property regardless of the authorization server response, as we require it to provide the refresh token functionality.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Fork the repo on github and send a pull requests with feature branches to the ```develop``` branch. Do not forget to provide tests to your contribution.
3+
Fork the repo on GitHub and send a pull requests with feature branches to the ```develop``` branch. Do not forget to provide tests to your contribution.
44

55
## Node version
66
This project is pinned to an specific node version for local development by using [volta](https://volta.sh/) as engines manager. Make sure you have it installed, to ensure your changes are tested with our recommended engine.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ See the [API reference](./API.md#new-clientcredentialsoptions) for a complete re
158158

159159
### Access Token
160160

161-
On completion of any [supported grant type](#supported-grant-types) an access token will be obtained. A list of supported operations can be found below.
161+
On completion of any [supported grant type](#supported-grant-types), an access token will be obtained. A list of supported operations can be found below.
162162

163163
#### Refresh an access token
164164

165-
On long lived applications, it is often necessary to refresh access tokens. In such scenarios the access token is usually persisted in an external database by first serializing it.
165+
On long-lived applications, it is often necessary to refresh access tokens. In such scenarios, the access token is usually persisted in an external database by first serializing it.
166166

167167

168168
```javascript
@@ -321,7 +321,7 @@ Simple OAuth 2.0 is licensed under the [Apache License, Version 2.0](http://www.
321321

322322
## Thanks to Open Source
323323

324-
Simple OAuth 2.0 come to life thanks to the work I've made in Lelylan, an open source microservices architecture for the Internet of Things. If this project helped you in any way, think about giving us a <a href="https://github.com/lelylan/lelylan">star on Github</a>.
324+
Simple OAuth 2.0 come to life thanks to the work I've made in Lelylan, an open source microservices architecture for the Internet of Things. If this project helped you in any way, think about giving us a <a href="https://github.com/lelylan/lelylan">star on GitHub</a>.
325325

326326
<a href="https://github.com/lelylan/lelylan">
327327
<img src="https://raw.githubusercontent.com/lelylan/lelylan/master/public/logo-lelylan.png" data-canonical-src="https://raw.githubusercontent.com/lelylan/lelylan/master/public/logo-lelylan.png" width="300"/></a>

0 commit comments

Comments
 (0)