From ffe68dbe0219bab535c1018448eb4c0b22f1f902 Mon Sep 17 00:00:00 2001 From: Jakub Mikulas Date: Tue, 21 Apr 2015 13:06:24 +0200 Subject: [PATCH] Typo --- index.js | 2 +- test/undefined_secretOrPublickey.tests.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index c20ba4b..37dd0c5 100644 --- a/index.js +++ b/index.js @@ -108,7 +108,7 @@ module.exports.verify = function(jwtString, secretOrPublicKey, options, callback } if (typeof secretOrPublicKey === "undefined" || secretOrPublicKey === null) // secretOrPublicKey can be empty string - return done(new JsonWebTokenError('secret or publick key must be provided')); + return done(new JsonWebTokenError('secret or public key must be provided')); if (!options.algorithms) { options.algorithms = ~secretOrPublicKey.toString().indexOf('BEGIN CERTIFICATE') || diff --git a/test/undefined_secretOrPublickey.tests.js b/test/undefined_secretOrPublickey.tests.js index 9e470ba..01132ad 100644 --- a/test/undefined_secretOrPublickey.tests.js +++ b/test/undefined_secretOrPublickey.tests.js @@ -9,12 +9,12 @@ describe('verifying without specified secret or public key', function () { it('should not verify null', function () { expect(function () { jwt.verify(TOKEN, null); - }).to.throw(JsonWebTokenError, /secret or publick key must be provided/); + }).to.throw(JsonWebTokenError, /secret or public key must be provided/); }); it('should not verify undefined', function () { expect(function () { jwt.verify(TOKEN); - }).to.throw(JsonWebTokenError, /secret or publick key must be provided/); + }).to.throw(JsonWebTokenError, /secret or public key must be provided/); }); }); \ No newline at end of file