Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jose

Package Overview
Dependencies
Maintainers
1
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jose - npm Package Compare versions

Comparing version 4.6.1 to 4.6.2

9

dist/browser/lib/jwt_claims_set.js

@@ -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) {

@@ -63,9 +63,4 @@ "use strict";

const now = (0, epoch_js_1.default)(currentDate || new Date());
if (payload.iat !== undefined || options.maxTokenAge) {
if (typeof payload.iat !== 'number') {
throw new errors_js_1.JWTClaimValidationFailed('"iat" claim must be a number', 'iat', 'invalid');
}
if (payload.exp === undefined && payload.iat > now + tolerance) {
throw new errors_js_1.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 errors_js_1.JWTClaimValidationFailed('"iat" claim must be a number', 'iat', 'invalid');
}

@@ -72,0 +67,0 @@ if (payload.nbf !== undefined) {

@@ -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",
"version": "4.6.1",
"version": "4.6.2",
"description": "'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto",

@@ -5,0 +5,0 @@ "keywords": [

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