expiry in token table
This commit is contained in:
4
auth.py
4
auth.py
@ -145,8 +145,8 @@ def getRefreshTokenFromDB(application, login):
|
|||||||
|
|
||||||
with conn.cursor() as cur:
|
with conn.cursor() as cur:
|
||||||
salt = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(64))
|
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',
|
cur.execute('INSERT INTO token_t ("user", salt, expiry) VALUES (%s, %s, %s) RETURNING id',
|
||||||
(userObj[0], salt))
|
(userObj[0], salt, userObj[1]))
|
||||||
tokenObj = cur.fetchone()
|
tokenObj = cur.fetchone()
|
||||||
logger.debug("tokenObj: {}".format(tokenObj))
|
logger.debug("tokenObj: {}".format(tokenObj))
|
||||||
if not tokenObj:
|
if not tokenObj:
|
||||||
|
Reference in New Issue
Block a user