aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/oauth2
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-05-23 09:40:16 -0500
committerFrederick Muriuki Muriithi2024-05-23 09:40:16 -0500
commitae94536ac15f71731a2ddcbbab89ed059b7284fb (patch)
tree3d0dc45889505d2f2986968bf0dd4ccd6aaeff8c /gn2/wqflask/oauth2
parenteb649f3e2671cb9a8a9b95d301d6ed4cc40c0656 (diff)
downloadgenenetwork2-ae94536ac15f71731a2ddcbbab89ed059b7284fb.tar.gz
Bug: Compute numeric timestamp for the claims.
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r--gn2/wqflask/oauth2/toplevel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn2/wqflask/oauth2/toplevel.py b/gn2/wqflask/oauth2/toplevel.py
index 23965cc1..f0179250 100644
--- a/gn2/wqflask/oauth2/toplevel.py
+++ b/gn2/wqflask/oauth2/toplevel.py
@@ -47,7 +47,7 @@ def authorisation_code():
"iss": str(oauth2_clientid()),
"sub": request.args["user_id"],
"aud": urljoin(authserver_uri(), "auth/token"),
- "exp": (issued + datetime.timedelta(minutes=5)),
+ "exp": (issued + datetime.timedelta(minutes=5)).timestamp(),
"nbf": int(issued.timestamp()),
"iat": int(issued.timestamp()),
"jti": str(uuid.uuid4())},