Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
JackuB committed Apr 21, 2015
1 parent d6240e2 commit ffe68db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') ||
Expand Down
4 changes: 2 additions & 2 deletions test/undefined_secretOrPublickey.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/);
});
});

0 comments on commit ffe68db

Please sign in to comment.