Atrix 7.0.0.-alpha5#60
Open
ChrisHubinger wants to merge 5 commits into
Open
Conversation
thomaspeklak
approved these changes
Aug 30, 2023
thomaspeklak
left a comment
Contributor
There was a problem hiding this comment.
Implementation seems fine. Used the same library in other project. Only some minor issues.
Is there a place where the config is validated, have not seen it.
Comment on lines
+253
to
+257
| const verifyOptions = { | ||
| audience: cfg.verifyOptions && cfg.verifyOptions.audience || undefined, | ||
| issuer: cfg.verifyOptions && cfg.verifyOptions.issuer || undefined, | ||
| algorithms: cfg.verifyOptions && cfg.verifyOptions.algorithms || [cfg.algorithm], | ||
| }; |
Contributor
There was a problem hiding this comment.
verifyOptions are options from https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback. You could also verify sub (subject) for instance.
| const res = await svc.get('/data'); | ||
| expect(res.statusCode).to.equal(401); | ||
| }); | ||
| describe('Use JWKS to fetch keys', () => { |
Contributor
There was a problem hiding this comment.
only happy paths tests. e.g. no expired token, unsupported algorithm, validateUser returns false, ...
| rateLimit: true, | ||
|
|
||
| // max jwks requests | ||
| jwksRequestsPerMinute: true, |
Contributor
There was a problem hiding this comment.
should be a number, not boolean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
JWKSkey fetching for JWT security strategy using jwks-rsaissuerandaudiencewithjwtsecurity enabledBreaking Changes
Please refer to Hapi documentation to check for breaking changes that may affect you by using hapi internals.