expiry in token table

This commit is contained in:
Wolfgang Hottgenroth 2021-09-03 19:35:30 +02:00
parent b2e1ecab2b
commit 629a85fc3e
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -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: