Skip to content

Commit

Permalink
Added algorithm option to jwt policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Brady-Conn committed Jul 16, 2020
1 parent c294fa7 commit bccffbf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/policies/jwt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ module.exports = {
type: 'boolean',
default: true,
description: 'Value istructing the gateway whether verify the sub against the internal SOC'
},
algorithms: {
type: 'array',
description: 'If defined, limits valid jwts to specified algorithms'
}
},
required: ['jwtExtractor', 'checkCredentialExistence'],
Expand Down
3 changes: 2 additions & 1 deletion lib/policies/jwt/jwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ module.exports = function (params) {
secretOrKey,
jwtFromRequest: extractor,
audience: params.audience,
issuer: params.issuer
issuer: params.issuer,
algorithms: params.algorithms
}, (jwtPayload, done) => {
if (!jwtPayload) {
return done(null, false);
Expand Down

0 comments on commit bccffbf

Please sign in to comment.