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,