Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
Upgrade passport-jwt & jsonwebtoken
Browse files Browse the repository at this point in the history
To address security issues. Some minor code changes required to match.
  • Loading branch information
mjs committed Jun 28, 2018
1 parent 64d52a3 commit 680083e
Show file tree
Hide file tree
Showing 4 changed files with 5,395 additions and 264 deletions.
2 changes: 1 addition & 1 deletion api/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const { body, check, header, validationResult, query } = require('express-valida
*/
const authenticate = function(type) {
return header('Authorization').custom(async (value, {req}) => {
const token = ExtractJwt.fromAuthHeader()(req);
const token = ExtractJwt.fromAuthHeaderWithScheme('jwt')(req);
if (token == null) {
throw new Error('could not find JWT token');
}
Expand Down
Loading

0 comments on commit 680083e

Please sign in to comment.