openid-client 5.1.0 → 5.1.1

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/lib/client.js CHANGED
@@ -31,7 +31,7 @@ const { queryKeyStore } = require('./helpers/issuer');
31
31
  const DeviceFlowHandle = require('./device_flow_handle');
32
32
 
33
33
  const [major, minor] = process.version
34
- .substr(1)
34
+ .slice(1)
35
35
  .split('.')
36
36
  .map((str) => parseInt(str, 10));
37
37
 
@@ -39,7 +39,7 @@ const keyscore = (key, { alg, use }) => {
39
39
  };
40
40
 
41
41
  function getKtyFromAlg(alg) {
42
- switch (typeof alg === 'string' && alg.substr(0, 2)) {
42
+ switch (typeof alg === 'string' && alg.slice(0, 2)) {
43
43
  case 'RS':
44
44
  case 'PS':
45
45
  return 'RSA';
@@ -68,7 +68,7 @@ function getAlgorithms(use, alg, kty, crv) {
68
68
  }
69
69
 
70
70
  if (use === 'sig' || use === undefined) {
71
- algs = algs.concat([`ES${crv.substr(-3)}`.replace('21', '12')]);
71
+ algs = algs.concat([`ES${crv.slice(-3)}`.replace('21', '12')]);
72
72
  }
73
73
 
74
74
  return new Set(algs);
@@ -1,7 +1,7 @@
1
1
  module.exports = function pick(object, ...paths) {
2
2
  const obj = {};
3
3
  for (const path of paths) {
4
- if (object[path]) {
4
+ if (object[path] !== undefined) {
5
5
  obj[path] = object[path];
6
6
  }
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openid-client",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs",
5
5
  "keywords": [
6
6
  "auth",
@@ -84,7 +84,7 @@
84
84
  },
85
85
  {
86
86
  "type": "fix",
87
- "section": "Bug Fixes"
87
+ "section": "Fixes"
88
88
  },
89
89
  {
90
90
  "type": "chore",