mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
make enforce_csrf
a class method
This commit is contained in:
parent
73f4835a53
commit
a4de2d6570
|
@ -132,7 +132,8 @@ class SessionAuthentication(BaseAuthentication):
|
||||||
# CSRF passed with authenticated user
|
# CSRF passed with authenticated user
|
||||||
return (user, None)
|
return (user, None)
|
||||||
|
|
||||||
def enforce_csrf(self, request):
|
@classmethod
|
||||||
|
def enforce_csrf(cls, request):
|
||||||
"""
|
"""
|
||||||
Enforce CSRF validation for session based authentication.
|
Enforce CSRF validation for session based authentication.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user