fix distraction errors

This commit is contained in:
cbomprezzi 2020-06-15 17:57:59 +02:00
parent 5a751e241c
commit f05abda5b0

View File

@ -87,7 +87,7 @@ class LoginView(GenericAPIView):
if getattr(settings, 'REST_USE_JWT', False): if getattr(settings, 'REST_USE_JWT', False):
cookie_name = getattr(settings, 'JWT_AUTH_COOKIE', None) cookie_name = getattr(settings, 'JWT_AUTH_COOKIE', None)
cookie_secure = getattr(settings, 'JWT_AUTH_SECURE', False) cookie_secure = getattr(settings, 'JWT_AUTH_SECURE', False)
cookie_samesite = getattr(settings, 'JWT_AUTH_HTTPONLY', True) cookie_httponly = getattr(settings, 'JWT_AUTH_HTTPONLY', True)
cookie_samesite = getattr(settings, 'JWT_AUTH_SAMESITE', 'Lax') cookie_samesite = getattr(settings, 'JWT_AUTH_SAMESITE', 'Lax')
from rest_framework_simplejwt.settings import api_settings as jwt_settings from rest_framework_simplejwt.settings import api_settings as jwt_settings
if cookie_name: if cookie_name:
@ -98,7 +98,7 @@ class LoginView(GenericAPIView):
self.access_token, self.access_token,
expires=expiration, expires=expiration,
secure=cookie_secure, secure=cookie_secure,
httponly=True, httponly=cookie_httponly,
samesite=cookie_samesite samesite=cookie_samesite
) )
return response return response