oidc-token-hash
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -7,4 +7,9 @@ const { strict: assert } = require('assert'); | ||
const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); | ||
const encode = (input) => fromBase64(input.toString('base64')); | ||
let encode; | ||
if (Buffer.isEncoding('base64url')) { | ||
encode = (input) => input.toString('base64url'); | ||
} else { | ||
const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_'); | ||
encode = (input) => fromBase64(input.toString('base64')); | ||
} | ||
@@ -11,0 +16,0 @@ /** SPECIFICATION |
{ | ||
"name": "oidc-token-hash", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"homepage": "https://github.com/panva/oidc-token-hash", | ||
@@ -22,6 +22,6 @@ "bugs": { | ||
"devDependencies": { | ||
"eslint": "^6.5.1", | ||
"eslint-config-airbnb-base": "^14.0.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"nyc": "^14.1.1" | ||
"eslint": "^7.2.0", | ||
"eslint-config-airbnb-base": "^14.2.0", | ||
"eslint-plugin-import": "^2.21.2", | ||
"nyc": "^15.1.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "engines": { |
@@ -47,2 +47,3 @@ # oidc-token-hash | ||
## Changelog | ||
- 5.0.1 - use `base64url` native encoding in Node.js when available | ||
- 5.0.0 - fixed `Ed448` and `shake256` to use 114 bytes output | ||
@@ -49,0 +50,0 @@ - 4.0.0 - using `sha512` for `Ed25519` and `shake256` for `Ed448`, refactored API, removed handling of `none` JWS alg |
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
8516
94
56
0