Skip to content

Commit

Permalink
add config to ensure create and verify routes not authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewglover committed Oct 14, 2016
1 parent 66d4500 commit ad9800e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/create_token_route.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const createTokenRoute = opts =>
({
method: 'GET',
path: opts.createTokenPath,
config: { auth: false },
handler: (req, reply) =>
Promise.resolve(opts.prepareTokenData(req))
.then(signJWT(opts.jwtOptions, opts.jwtSecret))
Expand Down
1 change: 1 addition & 0 deletions lib/verify_token_route.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const createTokenRoute = opts =>
({
method: 'GET',
path: opts.verifyTokenPath,
config: { auth: false },
handler: (req, reply) =>
verifyJWT(opts.jwtOptions, opts.jwtSecret, req.query.jwt)
.then(reply)
Expand Down

0 comments on commit ad9800e

Please sign in to comment.