simple-oauth2
Advanced tools
Comparing version 4.2.0 to 4.3.0
# Changelog | ||
## 4.3.0 | ||
### New features | ||
- [#387](https://github.com/lelylan/simple-oauth2/pull/387) Add support to configure refreshPath | ||
### Maintainance | ||
- [#386](https://github.com/lelylan/simple-oauth2/pull/386) Update eslint v8 | ||
- [#379](https://github.com/lelylan/simple-oauth2/pull/379) Use c8 to collect code coverage | ||
- [#356](https://github.com/lelylan/simple-oauth2/pull/356) Update development dependencies | ||
- [#355](https://github.com/lelylan/simple-oauth2/pull/355) Add package support info | ||
### Documentation | ||
- [#385](https://github.com/lelylan/simple-oauth2/pull/385) Documentation update | ||
- [#380](https://github.com/lelylan/simple-oauth2/pull/380) Deprecate simple-oauth2 v3 | ||
- [#373](https://github.com/lelylan/simple-oauth2/pull/373) Documentation update | ||
## 4.2.0 | ||
@@ -4,0 +20,0 @@ |
@@ -42,3 +42,3 @@ 'use strict'; | ||
*/ | ||
async refresh(params = {}, httpOptions) { | ||
async refresh(params = {}, httpOptions = {}) { | ||
const refreshParams = { | ||
@@ -50,3 +50,3 @@ ...params, | ||
const parameters = GrantTypeParams.forGrantType(REFRESH_TOKEN_PROPERTY_NAME, this.#config.options, refreshParams); | ||
const response = await this.#client.request(this.#config.auth.tokenPath, parameters.toObject(), httpOptions); | ||
const response = await this.#client.request(this.#config.auth.refreshPath, parameters.toObject(), httpOptions); | ||
@@ -53,0 +53,0 @@ return new AccessToken(this.#config, this.#client, response); |
@@ -19,2 +19,3 @@ 'use strict'; | ||
tokenPath: Joi.string().default('/oauth/token'), | ||
refreshPath: Joi.string().default(Joi.ref('tokenPath')), | ||
revokePath: Joi.string().default('/oauth/revoke'), | ||
@@ -21,0 +22,0 @@ authorizeHost: Joi.string().uri({ scheme: ['http', 'https'] }).default(Joi.ref('tokenHost')), |
{ | ||
"name": "simple-oauth2", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"support": true, | ||
"description": "Node.js client for OAuth2", | ||
@@ -24,3 +25,3 @@ "author": "Andrea Reginato <andrea.reginato@gmail.com>", | ||
"pretest": "npm run lint", | ||
"test": "nyc ava", | ||
"test": "c8 ava", | ||
"lint": "eslint .", | ||
@@ -30,3 +31,3 @@ "docs-gen": "doctoc README.md --github --no-title", | ||
}, | ||
"nyc": { | ||
"c8": { | ||
"check-coverage": true, | ||
@@ -36,3 +37,3 @@ "lines": 100, | ||
"functions": 100, | ||
"branches": 100, | ||
"branches": 93, | ||
"reporter": [ | ||
@@ -58,13 +59,12 @@ "lcov", | ||
"@hapi/boom": "^9.1.0", | ||
"ava": "^3.8.2", | ||
"babel-eslint": "^10.1.0", | ||
"chance": "^1.1.6", | ||
"chance-access-token": "^2.0.0", | ||
"ava": "^3.15.0", | ||
"c8": "^7.8.0", | ||
"chance": "^1.1.7", | ||
"chance-access-token": "^2.1.0", | ||
"date-fns": "^2.14.0", | ||
"doctoc": "^1.4.0", | ||
"eslint": "^7.2.0", | ||
"eslint-config-airbnb-base": "^14.2.0", | ||
"eslint-plugin-import": "^2.21.2", | ||
"nock": "^12.0.3", | ||
"nyc": "^15.1.0" | ||
"eslint": "^8.2.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.25.3", | ||
"nock": "^13.1.2" | ||
}, | ||
@@ -71,0 +71,0 @@ "volta": { |
@@ -7,3 +7,3 @@ # Simple OAuth2 | ||
[Simple OAuth2](#simple-oauth2) is a Node.js client library for the [OAuth 2.0](http://oauth.net/2/) authorization framework. [OAuth 2.0](http://oauth.net/2/) is the industry-standard protocol for authorization, enabling third-party applications to obtain limited access to an HTTP service, either on behalf of a resource owner or by allowing the third-party application to obtain access on it's own behalf. | ||
[Simple OAuth2](#simple-oauth2) is a Node.js client library for the [OAuth 2.0](http://oauth.net/2/) authorization framework. [OAuth 2.0](http://oauth.net/2/) is the industry-standard protocol for authorization, enabling third-party applications to obtain limited access to an HTTP service, either on behalf of a resource owner or by allowing the third-party application to obtain access on its own behalf. | ||
@@ -42,4 +42,4 @@ ## Table of Contents | ||
|----------------------------------------------------------------------------------|---------------------| | ||
| [3.x](https://github.com/lelylan/simple-oauth2/tree/3.x) | Node 8.x or higher | | ||
| [4.x (Current)](https://github.com/lelylan/simple-oauth2/tree/master) | Node 12.x or higher | | ||
| [4.x](https://github.com/lelylan/simple-oauth2/tree/4.x) | Node 12.x or higher | | ||
| [5.x (Development)](https://github.com/lelylan/simple-oauth2/tree/master) | Node 14.x or higher | | ||
@@ -56,3 +56,3 @@ Older node versions are unsupported. | ||
With a minimal configuration, create an client instace of any supported [grant type](#supported-grant-types). | ||
With a minimal configuration, create a client instance of any supported [grant type](#supported-grant-types). | ||
@@ -59,0 +59,0 @@ ```javascript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
45522
11
504
0