diff options
Diffstat (limited to 'djangorestframework/authentication.py')
| -rw-r--r-- | djangorestframework/authentication.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/djangorestframework/authentication.py b/djangorestframework/authentication.py index 904853e7..3ddd9e45 100644 --- a/djangorestframework/authentication.py +++ b/djangorestframework/authentication.py @@ -20,12 +20,6 @@ class BaseAuthentication(object): All authentication classes should extend BaseAuthentication. """ - def __init__(self, view): - """ - :class:`Authentication` classes are always passed the current view on creation. - """ - self.view = view - def authenticate(self, request): """ Authenticate the :obj:`request` and return a :obj:`User` or :const:`None`. [*]_ @@ -84,8 +78,7 @@ class UserLoggedInAuthentication(BaseAuthentication): Returns a :obj:`User` if the request session currently has a logged in user. Otherwise returns :const:`None`. """ - request.DATA # Make sure our generic parsing runs first - user = getattr(request.request, 'user', None) + user = getattr(request._request, 'user', None) if user and user.is_active: # Enforce CSRF validation for session based authentication. |
