Skip to content

Commit

Permalink
fix: use datetime.datetime.timestamp function to have a milliseconds (#…
Browse files Browse the repository at this point in the history
…821)

Fixes #814
  • Loading branch information
daillouf authored Nov 5, 2022
1 parent 00cd759 commit ea9ea4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jwt/api_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _validate_claims(self, payload, options, audience=None, issuer=None, leeway=

self._validate_required_claims(payload, options)

now = timegm(datetime.now(tz=timezone.utc).utctimetuple())
now = datetime.now(tz=timezone.utc).timestamp()

if "iat" in payload and options["verify_iat"]:
self._validate_iat(payload, now, leeway)
Expand Down

0 comments on commit ea9ea4d

Please sign in to comment.