From 95a4a2727805db53f52c1bae720468c0e874b8bf Mon Sep 17 00:00:00 2001 From: through-your-tears Date: Sat, 6 Apr 2024 10:34:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=B0=D1=83=D1=82?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D0=B8=D1=84=D0=B8=D0=BA=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jwtauth/token_generators.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jwtauth/token_generators.py b/src/jwtauth/token_generators.py index 3f94e68..63d54b1 100644 --- a/src/jwtauth/token_generators.py +++ b/src/jwtauth/token_generators.py @@ -7,10 +7,10 @@ import jwt def generate_jwt(pk): dt = datetime.datetime.now(tz=pytz.timezone('Europe/Moscow')) + datetime.timedelta( - seconds=settings.TOKEN_LIFETIME['seconds'], - minutes=settings.TOKEN_LIFETIME['minutes'], - hours=settings.TOKEN_LIFETIME['hours'], - days=settings.TOKEN_LIFETIME['days'] + seconds=settings.ACCESS_TOKEN_LIFETIME['seconds'], + minutes=settings.ACCESS_TOKEN_LIFETIME['minutes'], + hours=settings.ACCESS_TOKEN_LIFETIME['hours'], + days=settings.ACCESS_TOKEN_LIFETIME['days'] ) token = jwt.api_jwt.encode({ 'id': pk,