aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/oauth2/toplevel.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-05-23 09:40:16 -0500
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commitc871b5019ebaf1c57e7c9666b741cfa6a5393942 (patch)
treedf85df4ff1066c6a956245c37670ee6c7b4da68f /gn2/wqflask/oauth2/toplevel.py
parent31c8f14df9f354ea3cef82c28ce3d9006d424b65 (diff)
downloadgenenetwork2-c871b5019ebaf1c57e7c9666b741cfa6a5393942.tar.gz
Bug: Compute numeric timestamp for the claims.
Diffstat (limited to 'gn2/wqflask/oauth2/toplevel.py')
-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())},