openid-client
Advanced tools
Comparing version 3.12.0 to 3.12.1
@@ -5,2 +5,11 @@ # Change Log | ||
## [3.12.1](https://github.com/panva/node-openid-client/compare/v3.12.0...v3.12.1) (2020-01-25) | ||
### Bug Fixes | ||
* allow multiple keys to match when selecting encryption key for request object ([fa3fa67](https://github.com/panva/node-openid-client/commit/fa3fa677709f4e229c6356896731416feff71509)) | ||
# [3.12.0](https://github.com/panva/node-openid-client/compare/v3.11.0...v3.12.0) (2020-01-23) | ||
@@ -7,0 +16,0 @@ |
@@ -1510,7 +1510,7 @@ /* eslint-disable max-classes-per-file */ | ||
if (fields.alg.match(/^(RSA|ECDH)/)) { | ||
key = await this.issuer.queryKeyStore({ | ||
[key] = await this.issuer.queryKeyStore({ | ||
alg: fields.alg, | ||
enc: fields.enc, | ||
use: 'enc', | ||
}, false); | ||
}, { allowMulti: true }); | ||
} else { | ||
@@ -1517,0 +1517,0 @@ key = await this.joseSecret(fields.alg === 'dir' ? fields.enc : fields.alg); |
@@ -108,3 +108,3 @@ /* eslint-disable max-classes-per-file */ | ||
kid, kty, alg, use, key_ops: ops, | ||
}, allowKeyStore = true) { | ||
}, { allowMulti = false } = {}) { | ||
const cache = instance(this).get('cache'); | ||
@@ -136,3 +136,3 @@ | ||
if (keys.length > 1 && !kid) { | ||
if (!allowMulti && keys.length > 1 && !kid) { | ||
throw new RPError({ | ||
@@ -146,10 +146,2 @@ printf: ["multiple matching keys found in issuer's jwks_uri for key parameters %j, kid must be provided in this case", def], | ||
if (!allowKeyStore) { | ||
return keys[0]; | ||
} | ||
if (keys.length === 1) { | ||
return keys[0]; | ||
} | ||
return new jose.JWKS.KeyStore(keys); | ||
@@ -156,0 +148,0 @@ } |
{ | ||
"name": "openid-client", | ||
"version": "3.12.0", | ||
"version": "3.12.1", | ||
"description": "OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
157595
3108