openid-client 3.15.5 → 3.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +2 -3
- package/lib/helpers/consts.js +2 -2
- package/lib/helpers/defaults.js +6 -2
- package/lib/helpers/merge.js +8 -5
- package/lib/issuer.js +6 -2
- package/package.json +7 -7
- package/types/index.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.15.9](https://github.com/panva/node-openid-client/compare/v3.15.8...v3.15.9) (2020-07-26)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **typescript:** max_age in AuthorizationParameters is a number ([5ce2a73](https://github.com/panva/node-openid-client/commit/5ce2a733890dba6ba2bc2f8f296a4235c0c5cdd6)), closes [#279](https://github.com/panva/node-openid-client/issues/279)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.15.8](https://github.com/panva/node-openid-client/compare/v3.15.7...v3.15.8) (2020-07-17)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* allow AAD appid including discovery URLs to be multi-tenant ([c27caab](https://github.com/panva/node-openid-client/commit/c27caab9b9df92b591c4f0491fd2ec346ff48988))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [3.15.7](https://github.com/panva/node-openid-client/compare/v3.15.6...v3.15.7) (2020-07-16)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## [3.15.6](https://github.com/panva/node-openid-client/compare/v3.15.5...v3.15.6) (2020-07-06)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* merge helper returns modified object, leftovers removed ([2e3339b](https://github.com/panva/node-openid-client/commit/2e3339bd82297d6e37574e007b8a443087f3291e))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
5
36
|
## [3.15.5](https://github.com/panva/node-openid-client/compare/v3.15.4...v3.15.5) (2020-06-26)
|
|
6
37
|
|
|
7
38
|
|
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ openid-client.
|
|
|
47
47
|
|
|
48
48
|
## Certification
|
|
49
49
|
[<img width="184" height="96" align="right" src="https://cdn.jsdelivr.net/gh/panva/node-openid-client@38cf016b0837e6d4116de3780b28d222d5780bc9/OpenID_Certified.png" alt="OpenID Certification">][openid-certified-link]
|
|
50
|
-
Filip Skokan has [certified][openid-certified-link] that [
|
|
50
|
+
Filip Skokan has [certified][openid-certified-link] that [openid-client][npm-url]
|
|
51
51
|
conforms to the following profiles of the OpenID Connect™ protocol
|
|
52
52
|
|
|
53
53
|
- RP [Basic](https://openid.net/wordpress-content/uploads/2019/05/FilipSkokan_openid-client_RP-Basic-11-May-2019.zip), [Implicit](https://openid.net/wordpress-content/uploads/2019/05/FilipSkokan_openid-client_RP-Implicit-11-May-2019.zip), [Hybrid](https://openid.net/wordpress-content/uploads/2019/05/FilipSkokan_openid-client_RP-Hybrid-11-May-2019.zip), [Config](https://openid.net/wordpress-content/uploads/2019/05/FilipSkokan_openid-client_RP-Config-11-May-2019.zip), [Dynamic](https://openid.net/wordpress-content/uploads/2019/05/FilipSkokan_openid-client_RP-Dynamic-11-May-2019.zip), and [Form Post](https://openid.net/wordpress-content/uploads/2019/05/FilipSkokan_openid-client_RP-FormPost-11-May-2019.zip)
|
|
@@ -261,8 +261,7 @@ private API and is subject to change between any versions.
|
|
|
261
261
|
#### How do I use it outside of Node.js
|
|
262
262
|
|
|
263
263
|
It is **only built for ^10.13.0 || >=12.0.0 Node.js** environment - including openid-client in
|
|
264
|
-
|
|
265
|
-
results.
|
|
264
|
+
browser-environment targeted projects is not supported and may result in unexpected results.
|
|
266
265
|
|
|
267
266
|
#### What's new in 3.x?
|
|
268
267
|
|
package/lib/helpers/consts.js
CHANGED
|
@@ -2,12 +2,12 @@ const OIDC_DISCOVERY = '/.well-known/openid-configuration';
|
|
|
2
2
|
const OAUTH2_DISCOVERY = '/.well-known/oauth-authorization-server';
|
|
3
3
|
const WEBFINGER = '/.well-known/webfinger';
|
|
4
4
|
const REL = 'http://openid.net/specs/connect/1.0/issuer';
|
|
5
|
-
const AAD_MULTITENANT_DISCOVERY =
|
|
5
|
+
const AAD_MULTITENANT_DISCOVERY = [
|
|
6
6
|
`https://login.microsoftonline.com/common${OIDC_DISCOVERY}`,
|
|
7
7
|
`https://login.microsoftonline.com/common/v2.0${OIDC_DISCOVERY}`,
|
|
8
8
|
`https://login.microsoftonline.com/organizations/v2.0${OIDC_DISCOVERY}`,
|
|
9
9
|
`https://login.microsoftonline.com/consumers/v2.0${OIDC_DISCOVERY}`,
|
|
10
|
-
]
|
|
10
|
+
];
|
|
11
11
|
|
|
12
12
|
const CLIENT_DEFAULTS = {
|
|
13
13
|
grant_types: ['authorization_code'],
|
package/lib/helpers/defaults.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
/* eslint-disable no-restricted-syntax */
|
|
1
|
+
/* eslint-disable no-restricted-syntax, no-continue */
|
|
2
2
|
|
|
3
3
|
const isPlainObject = require('./is_plain_object');
|
|
4
4
|
|
|
5
5
|
function defaults(deep, target, ...sources) {
|
|
6
6
|
for (const source of sources) {
|
|
7
7
|
if (!isPlainObject(source)) {
|
|
8
|
-
continue;
|
|
8
|
+
continue;
|
|
9
9
|
}
|
|
10
10
|
for (const [key, value] of Object.entries(source)) {
|
|
11
|
+
/* istanbul ignore if */
|
|
12
|
+
if (key === '__proto__' || key === 'constructor') {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
11
15
|
if (typeof target[key] === 'undefined' && typeof value !== 'undefined') {
|
|
12
16
|
target[key] = value;
|
|
13
17
|
}
|
package/lib/helpers/merge.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
/* eslint-disable no-restricted-syntax */
|
|
1
|
+
/* eslint-disable no-restricted-syntax, no-param-reassign, no-continue */
|
|
2
2
|
|
|
3
3
|
const isPlainObject = require('./is_plain_object');
|
|
4
4
|
|
|
5
|
-
function merge(...sources) {
|
|
6
|
-
const target = {};
|
|
5
|
+
function merge(target, ...sources) {
|
|
7
6
|
for (const source of sources) {
|
|
8
7
|
if (!isPlainObject(source)) {
|
|
9
|
-
continue;
|
|
8
|
+
continue;
|
|
10
9
|
}
|
|
11
10
|
for (const [key, value] of Object.entries(source)) {
|
|
11
|
+
/* istanbul ignore if */
|
|
12
|
+
if (key === '__proto__' || key === 'constructor') {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
12
15
|
if (isPlainObject(target[key]) && isPlainObject(value)) {
|
|
13
16
|
target[key] = merge(target[key], value);
|
|
14
17
|
} else if (typeof value !== 'undefined') {
|
|
@@ -20,4 +23,4 @@ function merge(...sources) {
|
|
|
20
23
|
return target;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
module.exports = merge
|
|
26
|
+
module.exports = merge;
|
package/lib/issuer.js
CHANGED
|
@@ -221,7 +221,9 @@ class Issuer {
|
|
|
221
221
|
return new Issuer({
|
|
222
222
|
...ISSUER_DEFAULTS,
|
|
223
223
|
...body,
|
|
224
|
-
[AAD_MULTITENANT]: AAD_MULTITENANT_DISCOVERY.
|
|
224
|
+
[AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find(
|
|
225
|
+
(discoveryURL) => uri.startsWith(discoveryURL),
|
|
226
|
+
),
|
|
225
227
|
});
|
|
226
228
|
}
|
|
227
229
|
|
|
@@ -248,7 +250,9 @@ class Issuer {
|
|
|
248
250
|
return new Issuer({
|
|
249
251
|
...ISSUER_DEFAULTS,
|
|
250
252
|
...body,
|
|
251
|
-
[AAD_MULTITENANT]: AAD_MULTITENANT_DISCOVERY.
|
|
253
|
+
[AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find(
|
|
254
|
+
(discoveryURL) => wellKnownUri.startsWith(discoveryURL),
|
|
255
|
+
),
|
|
252
256
|
});
|
|
253
257
|
}));
|
|
254
258
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openid-client",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.9",
|
|
4
4
|
"description": "OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"auth",
|
|
@@ -45,23 +45,23 @@
|
|
|
45
45
|
"base64url": "^3.0.1",
|
|
46
46
|
"got": "^9.6.0",
|
|
47
47
|
"jose": "^1.27.1",
|
|
48
|
-
"lru-cache": "^
|
|
48
|
+
"lru-cache": "^6.0.0",
|
|
49
49
|
"make-error": "^1.3.6",
|
|
50
50
|
"object-hash": "^2.0.1",
|
|
51
51
|
"oidc-token-hash": "^5.0.0",
|
|
52
52
|
"p-any": "^3.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@commitlint/cli": "^
|
|
56
|
-
"@commitlint/config-conventional": "^
|
|
57
|
-
"@types/passport": "^1.0.
|
|
55
|
+
"@commitlint/cli": "^9.1.1",
|
|
56
|
+
"@commitlint/config-conventional": "^9.1.1",
|
|
57
|
+
"@types/passport": "^1.0.4",
|
|
58
58
|
"chai": "^4.2.0",
|
|
59
|
-
"eslint": "^7.
|
|
59
|
+
"eslint": "^7.4.0",
|
|
60
60
|
"eslint-config-airbnb-base": "^14.2.0",
|
|
61
61
|
"eslint-plugin-import": "^2.21.2",
|
|
62
62
|
"husky": "^4.0.0",
|
|
63
63
|
"mocha": "^8.0.1",
|
|
64
|
-
"nock": "^
|
|
64
|
+
"nock": "^13.0.2",
|
|
65
65
|
"nyc": "^15.1.0",
|
|
66
66
|
"readable-mock-req": "^0.2.2",
|
|
67
67
|
"sinon": "^9.0.0",
|
package/types/index.d.ts
CHANGED