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