Skip to content

JWT check nbf/exp #149

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

Merged
merged 5 commits into from
Jul 31, 2023
Merged

JWT check nbf/exp #149

merged 5 commits into from
Jul 31, 2023

Conversation

jschlyter
Copy link
Collaborator

@jschlyter jschlyter commented Jul 23, 2023

  • Check nbf and exp claims on JWT unpack
  • Allow setting iat on JWT pack
  • Allow setting maximum allowed token lifetime

Discussion: Do we want nbf/exp checking turned on by default (RFC 7519 compliant) or optional? One option would be to require the timestamp parameter to be set for time verification.

@jschlyter jschlyter requested a review from rohe July 23, 2023 04:35
@codecov-commenter
Copy link

codecov-commenter commented Jul 23, 2023

Codecov Report

Merging #149 (9ff84a2) into main (361ecaa) will increase coverage by 0.02%.
The diff coverage is 91.30%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
+ Coverage   76.48%   76.51%   +0.02%     
==========================================
  Files          44       44              
  Lines        4699     4713      +14     
  Branches      982      989       +7     
==========================================
+ Hits         3594     3606      +12     
  Misses        810      810              
- Partials      295      297       +2     
Files Changed Coverage Δ
src/cryptojwt/jwt.py 77.43% <91.30%> (+0.54%) ⬆️

@rohe
Copy link
Contributor

rohe commented Jul 31, 2023

I think nbf/exp checking should be on by default.

@rohe rohe merged commit 7ec089f into IdentityPython:main Jul 31, 2023
@jschlyter jschlyter deleted the unpack_check_nbf_exp branch July 31, 2023 08:07
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.

3 participants