Фикс аутентификации

main
through-your-tears 9 months ago
parent 7cb59138d5
commit 95a4a27278

@ -7,10 +7,10 @@ import jwt
def generate_jwt(pk): def generate_jwt(pk):
dt = datetime.datetime.now(tz=pytz.timezone('Europe/Moscow')) + datetime.timedelta( dt = datetime.datetime.now(tz=pytz.timezone('Europe/Moscow')) + datetime.timedelta(
seconds=settings.TOKEN_LIFETIME['seconds'], seconds=settings.ACCESS_TOKEN_LIFETIME['seconds'],
minutes=settings.TOKEN_LIFETIME['minutes'], minutes=settings.ACCESS_TOKEN_LIFETIME['minutes'],
hours=settings.TOKEN_LIFETIME['hours'], hours=settings.ACCESS_TOKEN_LIFETIME['hours'],
days=settings.TOKEN_LIFETIME['days'] days=settings.ACCESS_TOKEN_LIFETIME['days']
) )
token = jwt.api_jwt.encode({ token = jwt.api_jwt.encode({
'id': pk, 'id': pk,

Loading…
Cancel
Save