From fda571f66367018a25f7d850ff70598d3b49cdb5 Mon Sep 17 00:00:00 2001 From: Indraneel Dey Date: Thu, 15 Aug 2019 13:26:52 -0700 Subject: [PATCH] fix response code bug with jwt Update npm-shrinkwrap --- npm-shrinkwrap.json | 2 +- oauth/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index a306b1e..7143050 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -544,7 +544,7 @@ "dotenv": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.0.0.tgz", - "integrity": "sha1-7TEMFltOipe7dFsKnZnDG9pWZEA=" + "integrity": "sha512-30xVGqjLjiUOArT4+M5q9sYdvuR4riM6yK9wMcas9Vbp6zZa+ocC9dp6QoftuhTPhFAiLK/0C5Ni2nou/Bk8lg==" }, "ecc-jsbn": { "version": "0.1.2", diff --git a/oauth/index.js b/oauth/index.js index 64746a2..27b8a4c 100644 --- a/oauth/index.js +++ b/oauth/index.js @@ -248,7 +248,7 @@ module.exports.init = function(config, logger, stats) { return next(); } else { debug('invalid token'); - return sendError(req, res, next, logger, stats,'access_denied', 'invalid_token'); + return sendError(req, res, next, logger, stats, 'invalid_token', 'invalid_token'); } } else { if (tokenvalue === null || tokenvalue === undefined) { @@ -282,7 +282,7 @@ module.exports.init = function(config, logger, stats) { return next(); } else { debug('invalid token'); - return sendError(req, res, next, logger, stats,'access_denied', 'invalid_token'); + return sendError(req, res, next, logger, stats, 'invalid_token', 'invalid_token'); } } else { authorize(req, res, next, logger, stats, decodedToken.payloadObj, apiKey);