Socket
Socket
Sign inDemoInstall

express-jwt

Package Overview
Dependencies
19
Maintainers
48
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.4.0 to 8.4.1

38

dist/index.js

@@ -72,3 +72,3 @@ "use strict";

case 0:
_b.trys.push([0, 13, , 14]);
_b.trys.push([0, 14, , 15]);
if (req.method === 'OPTIONS' && 'access-control-request-headers' in req.headers) {

@@ -133,23 +133,25 @@ hasAuthInAccessControl = req.headers['access-control-request-headers']

case 5:
_b.trys.push([5, 6, , 10]);
jwt.verify(token, key, options);
return [3 /*break*/, 10];
_b.trys.push([5, 7, , 11]);
return [4 /*yield*/, jwt.verify(token, key, options)];
case 6:
_b.sent();
return [3 /*break*/, 11];
case 7:
err_1 = _b.sent();
wrappedErr = new UnauthorizedError_1.UnauthorizedError('invalid_token', err_1);
if (!(err_1 instanceof jwt.TokenExpiredError && typeof options.onExpired === 'function')) return [3 /*break*/, 8];
if (!(err_1 instanceof jwt.TokenExpiredError && typeof options.onExpired === 'function')) return [3 /*break*/, 9];
return [4 /*yield*/, options.onExpired(req, wrappedErr)];
case 7:
case 8:
_b.sent();
return [3 /*break*/, 9];
case 8: throw wrappedErr;
case 9: return [3 /*break*/, 10];
case 10:
return [3 /*break*/, 10];
case 9: throw wrappedErr;
case 10: return [3 /*break*/, 11];
case 11:
_a = options.isRevoked;
if (!_a) return [3 /*break*/, 12];
if (!_a) return [3 /*break*/, 13];
return [4 /*yield*/, options.isRevoked(req, decodedToken)];
case 11:
case 12:
_a = (_b.sent());
_b.label = 12;
case 12:
_b.label = 13;
case 13:
isRevoked = _a || false;

@@ -162,8 +164,8 @@ if (isRevoked) {

setImmediate(next);
return [3 /*break*/, 14];
case 13:
return [3 /*break*/, 15];
case 14:
err_2 = _b.sent();
setImmediate(next, err_2);
return [3 /*break*/, 14];
case 14: return [2 /*return*/];
return [3 /*break*/, 15];
case 15: return [2 /*return*/];
}

@@ -170,0 +172,0 @@ });

{
"name": "express-jwt",
"version": "8.4.0",
"version": "8.4.1",
"description": "JWT authentication middleware.",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc