diff options
| author | Tom Christie | 2013-06-29 21:34:47 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-06-29 21:34:47 +0100 | 
| commit | ab799ccc3ee473de61ec35c6f745c6952752c522 (patch) | |
| tree | 353b50417cb0afbe722abed8651be47ed73400e0 /rest_framework/authentication.py | |
| parent | 664f8c63655770cd90bdbd510b315bcd045b380a (diff) | |
| download | django-rest-framework-ab799ccc3ee473de61ec35c6f745c6952752c522.tar.bz2 | |
Simplify APIClient implementation
Diffstat (limited to 'rest_framework/authentication.py')
| -rw-r--r-- | rest_framework/authentication.py | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index b42162dd..cf001a24 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -109,14 +109,14 @@ class SessionAuthentication(BaseAuthentication):          """          # Get the underlying HttpRequest object -        http_request = request._request -        user = getattr(http_request, 'user', None) +        request = request._request +        user = getattr(request, 'user', None)          # Unauthenticated, CSRF validation not required          if not user or not user.is_active:              return None -        self.enforce_csrf(http_request) +        self.enforce_csrf(request)          # CSRF passed with authenticated user          return (user, None) | 
