From c13fca4f30f8d629bb926769a90d17f6f2bb5917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 31 Mar 2016 11:17:21 +0200 Subject: [PATCH] Use the same expire time in database and current_user dict --- pillar/application/utils/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/application/utils/authentication.py b/pillar/application/utils/authentication.py index 13db1c56..7d676fd0 100644 --- a/pillar/application/utils/authentication.py +++ b/pillar/application/utils/authentication.py @@ -109,7 +109,7 @@ def validate_token(): user_id=user_id, token=token, groups=groups, - token_expire_time=datetime.now() + timedelta(hours=1)) + token_expire_time=token_data['expire_time']) else: log.debug("User is already in our database and token hasn't expired yet.") users = app.data.driver.db['users']