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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offer an option to specify a cache for conditionally fetching public keys #81
Offer an option to specify a cache for conditionally fetching public keys #81
Changes from 16 commits
b844d07
5425c02
373e252
9a48b50
54b514b
4d06267
94c111e
d421896
73ae790
e62932a
029c584
6fdeb95
d10e983
8cda7cc
cd20041
58f4606
d62dd94
4828168
81a6f33
7a740cc
6322126
693ca29
5397672
2cb7b3a
73f15e4
903cdfe
c7b600e
c4320eb
fb4f95c
ec40132
8389fc2
f9707c5
5fa5d20
15ec544
13fbe9e
a975a31
861f2e3
2cca2a9
659a108
47c473e
e71f3f1
d3ebeb5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try if the changes work? I found the
etag
response andIf-None-Match
request header to be tricky in the past, there is some prefix that needs to be encoded ... just want to make sure we test the code in real-life before we merge the PR. If you run into any trouble let me know I can look what I did in other projectsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just thinking about test running the changes. Will report back! 🫡
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example script:
Running it:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add another test which sends the
fetchVerificationKeys()
request twice to simulate real-life behavior? The first one should respond with 200 and the body and aetag
header. And the 2nd responds with a 304.I'm not sure how undici is working with mocking, defining different replies for the same request can be tricky. We can also file a follow up issue and take care of it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a stab at this in fb4f95c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me update the
etag
to be something that looks like what we'd expect from the GitHub API - please hold!