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.2.0 to 4.2.1

test/issue_70.tests.js

8

index.js

@@ -111,5 +111,7 @@ var jws = require('jws');

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

@@ -116,0 +118,0 @@

{
"name": "jsonwebtoken",
"version": "4.2.0",
"version": "4.2.1",
"description": "JSON Web Token implementation (symmetric and asymmetric)",

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

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