Skip to content
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

nbf claim not used when passed on the payload (solve #453) #454

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

JacopoPatroclo
Copy link
Contributor

@JacopoPatroclo JacopoPatroclo commented Jul 5, 2024

Use nbf claim if present on payload.

closes #453

@JacopoPatroclo JacopoPatroclo added the bug Something isn't working label Jul 5, 2024
@JacopoPatroclo JacopoPatroclo linked an issue Jul 5, 2024 that may be closed by this pull request
Copy link
Member

@simoneb simoneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to include tests that also decode the token and check that the right value of the field is in the payload, according to the rules we have in place?

@JacopoPatroclo
Copy link
Contributor Author

JacopoPatroclo commented Jul 5, 2024

I thought about doing that but then I saw that the project follow a different structure for the tests separating sign and verification procedures I've change approach.
I will create a new suite to test the signing process back and forth for a couple of standard cases.

@simoneb
Copy link
Member

simoneb commented Jul 5, 2024

@JacopoPatroclo it was just a suggestion, I didn't actually check what's in the codebase, I just thought about it when looking at the existing tests and seeing they assert against an encoded token, which is hard to make sense of when looking at the code

src/signer.js Show resolved Hide resolved
@simoneb simoneb merged commit 3eaa791 into master Jul 15, 2024
7 checks passed
@simoneb simoneb deleted the hub/fix-nbf-claim-on-payload branch July 15, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nbf field in payload is ignored
3 participants