diff --git a/package.json b/package.json index c2fa154..0c41112 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "http://www.opensource.org/licenses/MIT" }, "dependencies": { - "jsonwebtoken": "^1.2.0", + "jsonwebtoken": "^4.2.2", "passport-http-bearer": "^1.0.1" }, "devDependencies": { diff --git a/test/strategy.normal.js b/test/strategy.normal.js index 82f48be..8d979c6 100644 --- a/test/strategy.normal.js +++ b/test/strategy.normal.js @@ -159,7 +159,7 @@ describe('Strategy', function() { chai.passport.use(new Strategy(secret, {audience: 'foo'}, function(token, done) { done(null, false)})) .fail(function(challenge) {; expect(challenge).to.be.a.string; - expect(challenge).to.equal('Bearer realm="Users", error="invalid_token", error_description="Invalid token (jwt audience invalid. expected: bar)"'); + expect(challenge).to.equal('Bearer realm="Users", error="invalid_token", error_description="Invalid token (jwt audience invalid. expected: foo)"'); done(); }) .req(function(req) { @@ -172,7 +172,7 @@ describe('Strategy', function() { chai.passport.use(new Strategy(secret, {issuer: 'foo'}, function(token, done) { done(null, false)})) .fail(function(challenge) {; expect(challenge).to.be.a.string; - expect(challenge).to.equal('Bearer realm="Users", error="invalid_token", error_description="Invalid token (jwt issuer invalid. expected: bar)"'); + expect(challenge).to.equal('Bearer realm="Users", error="invalid_token", error_description="Invalid token (jwt issuer invalid. expected: foo)"'); done(); }) .req(function(req) {