jose-browser-runtime
Advanced tools
Comparing version 4.6.1 to 4.6.2
@@ -61,9 +61,4 @@ import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from '../util/errors.js'; | ||
const now = epoch(currentDate || new Date()); | ||
if (payload.iat !== undefined || options.maxTokenAge) { | ||
if (typeof payload.iat !== 'number') { | ||
throw new JWTClaimValidationFailed('"iat" claim must be a number', 'iat', 'invalid'); | ||
} | ||
if (payload.exp === undefined && payload.iat > now + tolerance) { | ||
throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed'); | ||
} | ||
if ((payload.iat !== undefined || options.maxTokenAge) && typeof payload.iat !== 'number') { | ||
throw new JWTClaimValidationFailed('"iat" claim must be a number', 'iat', 'invalid'); | ||
} | ||
@@ -70,0 +65,0 @@ if (payload.nbf !== undefined) { |
{ | ||
"name": "jose-browser-runtime", | ||
"version": "4.6.1", | ||
"version": "4.6.2", | ||
"homepage": "https://github.com/panva/jose", | ||
@@ -5,0 +5,0 @@ "repository": "panva/jose", |
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
215454
5658