Socket
Socket
Sign inDemoInstall

jsonwebtoken

Package Overview
Dependencies
Maintainers
4
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonwebtoken - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

CHANGELOG.md

11

index.js

@@ -110,2 +110,8 @@ var jws = require('jws');

if (!options.algorithms) {
options.algorithms = ~secretOrPublicKey.toString().indexOf('BEGIN CERTIFICATE') ?
[ 'RS256','RS384','RS512','ES256','ES384','ES512' ] :
[ 'HS256','HS384','HS512' ];
}
var valid;

@@ -130,2 +136,7 @@

var header = jws.decode(jwtString).header;
if (!~options.algorithms.indexOf(header.alg)) {
return done(new JsonWebTokenError('invalid signature'));
}
if (typeof payload.exp !== 'undefined' && !options.ignoreExpiration) {

@@ -132,0 +143,0 @@ if (typeof payload.exp !== 'number') {

2

package.json
{
"name": "jsonwebtoken",
"version": "4.1.0",
"version": "4.2.0",
"description": "JSON Web Token implementation (symmetric and asymmetric)",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc