From 17b1779d82e410a77feaa3d0a55442d7a66d5e59 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Thu, 2 May 2019 00:59:13 +0200 Subject: [PATCH] Fixes --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index c44cc04..200e47d 100644 --- a/app.py +++ b/app.py @@ -2208,7 +2208,7 @@ def indieauth_endpoint(): print(code, redirect_uri, client_id) # Ensure the code is recent - if (datetime.now() - datetime.fromtimetamp(auth["ts"])) > timedelta(minutes=5): + if (datetime.now() - datetime.fromtimestamp(auth["ts"])) > timedelta(minutes=5): abort(400) if not auth: @@ -2247,7 +2247,7 @@ def token_endpoint(): now = datetime.now() # Ensure the code is recent - if (now - datetime.fromtimetamp(auth["ts"])) > timedelta(minutes=5): + if (now - datetime.fromtimestamp(auth["ts"])) > timedelta(minutes=5): abort(400) scope = auth["scope"].split() @@ -2275,7 +2275,7 @@ def token_endpoint(): abort(403) # Check the token expritation (valid for 3 hours) - if (datetime.now() - datetime.fromtimetamp(payload["ts"])) > timedelta(minutes=180): + if (datetime.now() - datetime.fromtimestamp(payload["ts"])) > timedelta(minutes=180): abort(401) return build_auth_resp(