Skip to content

Commit ffe68db

Browse files
committedApr 21, 2015
Typo
1 parent d6240e2 commit ffe68db

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module.exports.verify = function(jwtString, secretOrPublicKey, options, callback
108108
}
109109

110110
if (typeof secretOrPublicKey === "undefined" || secretOrPublicKey === null) // secretOrPublicKey can be empty string
111-
return done(new JsonWebTokenError('secret or publick key must be provided'));
111+
return done(new JsonWebTokenError('secret or public key must be provided'));
112112

113113
if (!options.algorithms) {
114114
options.algorithms = ~secretOrPublicKey.toString().indexOf('BEGIN CERTIFICATE') ||

‎test/undefined_secretOrPublickey.tests.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ describe('verifying without specified secret or public key', function () {
99
it('should not verify null', function () {
1010
expect(function () {
1111
jwt.verify(TOKEN, null);
12-
}).to.throw(JsonWebTokenError, /secret or publick key must be provided/);
12+
}).to.throw(JsonWebTokenError, /secret or public key must be provided/);
1313
});
1414

1515
it('should not verify undefined', function () {
1616
expect(function () {
1717
jwt.verify(TOKEN);
18-
}).to.throw(JsonWebTokenError, /secret or publick key must be provided/);
18+
}).to.throw(JsonWebTokenError, /secret or public key must be provided/);
1919
});
2020
});

0 commit comments

Comments
 (0)
Please sign in to comment.