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

add Web.JWT.Validate #7

Closed
wants to merge 6 commits into from
Closed

add Web.JWT.Validate #7

wants to merge 6 commits into from

Conversation

ocramz
Copy link

@ocramz ocramz commented Jun 11, 2023

  • add validation of 'exp' and 'nbf' fields (couldn't find a common standard to validate 'iat' against)
  • ensure a number of common fields are present in the JWT, and output a product type JWTClaims accordingly
  • introduce validation-selective, to collect and report all validation failures

Closes #6

@ocramz
Copy link
Author

ocramz commented Jun 17, 2023

Hi @puffnfresh how do you do? Did you get a chance to evaluate this?

@puffnfresh
Copy link
Owner

@ocramz got some tests somewhere?

@ocramz
Copy link
Author

ocramz commented Jun 17, 2023

@puffnfresh doesn't it look obviously correct? /s

@puffnfresh
Copy link
Owner

I'd probably just use validation instead of validation-selective, I don't see this code using the Selective instance.

@ocramz
Copy link
Author

ocramz commented Jun 18, 2023

we don't use lenses either, so it's possible to depend on this now : https://hackage.haskell.org/package/validation-micro-1.0.0.0

@ocramz ocramz closed this Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add validation of JWT fields
2 participants