Skip to content

Commit

Permalink
Merge pull request #81 from alanshaw/remove-hoek
Browse files Browse the repository at this point in the history
resolves #80 remove hoek dependency
  • Loading branch information
iteles committed Aug 11, 2015
2 parents a3a0e37 + 7299eb0 commit 0ba83b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var Boom = require('boom'); // error handling https://github.com/hapijs/boom
var Hoek = require('hoek'); // hapi utilities https://github.com/hapijs/hoek
var assert = require('assert');
var JWT = require('jsonwebtoken'); // https://github.com/docdis/learn-json-web-tokens
var extract = require('./extract'); // extract token from Auth Header, URL or Coookie
var pkg = require('../package.json');
Expand All @@ -20,9 +20,9 @@ internals.isFunction = function (functionToCheck) {
};

internals.implementation = function (server, options) {
Hoek.assert(options, 'options are required for jwt auth scheme'); // pre-auth checks
Hoek.assert(options.key, 'options must contain secret key or key lookup function'); // no signing key
Hoek.assert(typeof options.validateFunc === 'function', 'options.validateFunc must be a valid function');
assert(options, 'options are required for jwt auth scheme'); // pre-auth checks
assert(options.key, 'options must contain secret key or key lookup function'); // no signing key
assert(typeof options.validateFunc === 'function', 'options.validateFunc must be a valid function');

return {
authenticate: function (request, reply) {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"dependencies": {
"boom": "^2.8.0",
"cookie": "^0.1.3",
"hoek": "^2.14.0",
"jsonwebtoken": "^5.0.4"
},
"peerDependencies": {
Expand Down

0 comments on commit 0ba83b9

Please sign in to comment.