From 629a85fc3ec4a08ec04e54d11f2d45286f103f68 Mon Sep 17 00:00:00 2001 From: Wolfgang Ludger Hottgenroth Date: Fri, 3 Sep 2021 19:35:30 +0200 Subject: [PATCH] expiry in token table --- auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth.py b/auth.py index d01be8e..18187b7 100755 --- a/auth.py +++ b/auth.py @@ -145,8 +145,8 @@ def getRefreshTokenFromDB(application, login): with conn.cursor() as cur: salt = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(64)) - cur.execute('INSERT INTO token_t ("user", salt) VALUES (%s, %s) RETURNING id', - (userObj[0], salt)) + cur.execute('INSERT INTO token_t ("user", salt, expiry) VALUES (%s, %s, %s) RETURNING id', + (userObj[0], salt, userObj[1])) tokenObj = cur.fetchone() logger.debug("tokenObj: {}".format(tokenObj)) if not tokenObj: