Socket
Socket
Sign inDemoInstall

openid-client

Package Overview
Dependencies
Maintainers
1
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openid-client - npm Package Compare versions

Comparing version 3.7.3 to 3.7.4

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Change Log

## [3.7.4](https://github.com/panva/node-openid-client/compare/v3.7.3...v3.7.4) (2019-10-24)
### Bug Fixes
* allow distributed claims to be missing from the response ([48d6633](https://github.com/panva/node-openid-client/commit/48d6633af2bb5d724c2fee2628fdfc871324bb94)), closes [#197](https://github.com/panva/node-openid-client/issues/197)
## [3.7.3](https://github.com/panva/node-openid-client/compare/v3.7.2...v3.7.3) (2019-10-01)

@@ -7,0 +16,0 @@

28

lib/client.js

@@ -51,9 +51,10 @@ /* eslint-disable max-classes-per-file */

function assignClaim(target, source, sourceName) {
function assignClaim(target, source, sourceName, throwOnMissing = true) {
return ([claim, inSource]) => {
if (inSource === sourceName) {
if (source[claim] === undefined) {
if (throwOnMissing && source[claim] === undefined) {
throw new RPError(`expected claim "${claim}" in "${sourceName}"`);
} else if (source[claim] !== undefined) {
target[claim] = source[claim];
}
target[claim] = source[claim];
delete target._claim_names[claim];

@@ -280,3 +281,6 @@ }

target.search = null;
Object.assign(target.query, authorizationParams.call(this, params));
target.query = {
...target.query,
...authorizationParams.call(this, params),
};
return url.format(target);

@@ -336,6 +340,10 @@ }

target.search = null;
target.query = Object.assign(params, target.query, {
post_logout_redirect_uri,
id_token_hint: hint,
});
target.query = {
...params,
...target.query,
...{
post_logout_redirect_uri,
id_token_hint: hint,
},
};

@@ -1195,3 +1203,5 @@ Object.entries(target.query).forEach(([key, value]) => {

delete claims._claim_sources[sourceName];
Object.entries(claims._claim_names).forEach(assignClaim(claims, decoded, sourceName));
Object.entries(claims._claim_names).forEach(
assignClaim(claims, decoded, sourceName, false),
);
} catch (err) {

@@ -1198,0 +1208,0 @@ err.src = sourceName;

/* eslint-disable camelcase */
const { format } = require('util');
const assign = require('lodash/assign');
const makeError = require('make-error');

@@ -16,3 +17,3 @@

Object.assign(
assign(
this,

@@ -48,3 +49,3 @@ { error },

}
Object.assign(this, rest);
assign(this, rest);
if (response) {

@@ -51,0 +52,0 @@ Object.defineProperty(this, 'response', {

const base64url = require('base64url');
const assign = require('lodash/assign');

@@ -11,3 +12,3 @@ const now = require('./helpers/unix_timestamp');

constructor(values) {
Object.assign(this, values);
assign(this, values);
}

@@ -14,0 +15,0 @@

{
"name": "openid-client",
"version": "3.7.3",
"version": "3.7.4",
"description": "OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs",

@@ -44,7 +44,7 @@ "keywords": [

"got": "^9.6.0",
"jose": "^1.10.0",
"jose": "^1.10.1",
"lodash": "^4.17.13",
"lru-cache": "^5.1.1",
"make-error": "^1.3.5",
"object-hash": "^1.3.1",
"object-hash": "^2.0.0",
"oidc-token-hash": "^3.0.2",

@@ -60,8 +60,8 @@ "p-any": "^2.1.0"

"dtslint": "^0.9.8",
"eslint": "^6.5.0",
"eslint": "^6.5.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"husky": "^3.0.7",
"husky": "^3.0.8",
"mocha": "^6.2.1",
"nock": "^11.3.5",
"nock": "^11.4.0",
"nyc": "^14.1.1",

@@ -68,0 +68,0 @@ "readable-mock-req": "^0.2.2",

# openid-client
![build][actions-image] [![codecov][codecov-image]][codecov-url]
openid-client is a server side [OpenID][openid-connect] Relying Party (RP, Client) implementation for

@@ -246,4 +244,4 @@ Node.js runtime, supports [passport][passport-url].

Electron v6.x runtime is supported to the extent of the crypto engine BoringSSL feature parity with
standard Node.js OpenSSL.
Electron >=v6.0.0 runtime is supported to the extent of the crypto engine BoringSSL feature parity
with standard Node.js OpenSSL.

@@ -280,5 +278,2 @@ ## FAQ

[actions-image]: https://github.com/panva/node-openid-client/workflows/Continuous%20Integration/badge.svg
[codecov-image]: https://img.shields.io/codecov/c/github/panva/node-openid-client/master.svg
[codecov-url]: https://codecov.io/gh/panva/node-openid-client
[openid-connect]: https://openid.net/connect/

@@ -297,3 +292,3 @@ [feature-core]: https://openid.net/specs/openid-connect-core-1_0.html

[sponsor-auth0]: https://auth0.com/overview?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=openid-client&utm_content=auth
[support-sponsor]: https://github.com/users/panva/sponsorship
[support-sponsor]: https://github.com/sponsors/panva
[documentation]: https://github.com/panva/node-openid-client/blob/master/docs/README.md

@@ -300,0 +295,0 @@ [documentation-issuer]: https://github.com/panva/node-openid-client/blob/master/docs/README.md#issuer

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc