refresh_op
114 return response
115
116 # TODO Rename this here and in `post`
117 def refresh_op(self, response, cookie_name):118 cookie_secure = getattr(settings, "JWT_AUTH_SECURE", False)
119 cookie_httponly = getattr(settings, "JWT_AUTH_HTTPONLY", True)
120 cookie_samesite = getattr(settings, "JWT_AUTH_SAMESITE", "Lax")
post
106
107
108class RefreshToken(TokenRefreshView):
109 def post(self, request, *args, **kwargs):110 response = super().post(request, *args, **kwargs)
111 cookie_name = getattr(settings, "JWT_AUTH_COOKIE", None)
112 if cookie_name and response.status_code == 200 and "access" in response.data:
get_response_op
72 return response
73
74 # TODO Rename this here and in `get_response`
75 def get_response_op(self, response, refresh_token_expiration): 76 cookie_name = getattr(settings, "JWT_AUTH_COOKIE", None)
77 access_token_expiration = timezone.now() + jwt_settings.ACCESS_TOKEN_LIFETIME
78 cookie_secure = getattr(settings, "JWT_AUTH_SECURE", False)
get_response
28
29
30class Login(LoginView):
31 def get_response(self): 32 serializer_class = self.get_response_serializer()
33
34 if getattr(settings, "REST_USE_JWT", False):
get_serializer
141 allowed_methods = ("POST", "OPTIONS", "HEAD")
142
143 @staticmethod
144 def get_serializer(*args, **kwargs):145 return VerifyEmailSerializer(*args, **kwargs)
146
147 @staticmethod
The module/function docstring is missing.
If you want to ignore this, you can configure this in the .deepsource.toml
file. Please refer to docs for available options.