Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Node.js Role Based Authorization API

For documentation and instructions check out http://jasonwatmore.com/post/2018/11/28/nodejs-role-based-authorization-tutorial-with-example-api
For documentation and instructions check out https://jasonwatmore.com/post/2018/11/28/nodejs-role-based-authorization-tutorial-with-example-api
4 changes: 2 additions & 2 deletions _helpers/authorize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const expressJwt = require('express-jwt');
const jwt = require('express-jwt');
const { secret } = require('config.json');

module.exports = authorize;
Expand All @@ -12,7 +12,7 @@ function authorize(roles = []) {

return [
// authenticate JWT token and attach user to request object (req.user)
expressJwt({ secret }),
jwt({ secret, algorithms: ['HS256'] }),

// authorize based on user role
(req, res, next) => {
Expand Down
Loading