summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Dailloux <daillouf@users.noreply.github.com>2022-11-05 10:16:34 +0100
committerGitHub <noreply@github.com>2022-11-05 15:16:34 +0600
commitea9ea4d3b8662746166519dfe7b59ac50c4a5296 (patch)
treeafe945370d4ee5b845c576ddb0bb8ebc8f27cbb5
parent00cd759d86aae24176ead7bdbed273a07532443e (diff)
downloadpyjwt-ea9ea4d3b8662746166519dfe7b59ac50c4a5296.tar.gz
fix: use datetime.datetime.timestamp function to have a milliseconds (#821)
Fixes #814
-rw-r--r--jwt/api_jwt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/jwt/api_jwt.py b/jwt/api_jwt.py
index 4bb1ee1..77857d2 100644
--- a/jwt/api_jwt.py
+++ b/jwt/api_jwt.py
@@ -187,7 +187,7 @@ class PyJWT:
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)