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

docs: Update iat exception docs #974

Merged
merged 1 commit into from
Aug 25, 2024
Merged

Conversation

pachewise
Copy link
Contributor

@pachewise pachewise commented Aug 13, 2024

Updating documentation given which exception is thrown when. Source:

pyjwt/jwt/api_jwt.py

Lines 268 to 279 in d7710f7

def _validate_iat(
self,
payload: dict[str, Any],
now: float,
leeway: float,
) -> None:
try:
iat = int(payload["iat"])
except ValueError:
raise InvalidIssuedAtError("Issued At claim (iat) must be an integer.")
if iat > (now + leeway):
raise ImmatureSignatureError("The token is not yet valid (iat)")

@jpadilla jpadilla merged commit 9f40aa2 into jpadilla:master Aug 25, 2024
26 checks passed
@pachewise pachewise deleted the docs/iat-exc branch August 26, 2024 17:10
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.

2 participants