make enforce_csrf a class method

This commit is contained in:
Noam Cohen 2022-09-27 13:59:51 +03:00
parent 73f4835a53
commit a4de2d6570
No known key found for this signature in database
GPG Key ID: 99E133200BA7A2D6

View File

@ -132,7 +132,8 @@ class SessionAuthentication(BaseAuthentication):
# CSRF passed with authenticated user
return (user, None)
def enforce_csrf(self, request):
@classmethod
def enforce_csrf(cls, request):
"""
Enforce CSRF validation for session based authentication.
"""