aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/authenticators.py
diff options
context:
space:
mode:
authorTom Christie2011-04-11 13:45:38 +0100
committerTom Christie2011-04-11 13:45:38 +0100
commitcb9fb6ef2f9ac38c4f1c3946252a542b1f3f15d7 (patch)
treebde00f0ae3c0dbbb148d727b424da497e1f6b49f /djangorestframework/authenticators.py
parent941742593c50dcb0e1ca426621d107f12c9ee65c (diff)
downloaddjango-rest-framework-cb9fb6ef2f9ac38c4f1c3946252a542b1f3f15d7.tar.bz2
Refactoring of authentication/permissions
Diffstat (limited to 'djangorestframework/authenticators.py')
-rw-r--r--djangorestframework/authenticators.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/djangorestframework/authenticators.py b/djangorestframework/authenticators.py
index 0d267b64..e382de10 100644
--- a/djangorestframework/authenticators.py
+++ b/djangorestframework/authenticators.py
@@ -10,26 +10,6 @@ from djangorestframework.utils import as_tuple
import base64
-class AuthenticatorMixin(object):
- """Adds pluggable authentication behaviour."""
-
- """The set of authenticators to use."""
- authenticators = None
-
- def authenticate(self, request):
- """Attempt to authenticate the request, returning an authentication context or None.
- An authentication context may be any object, although in many cases it will simply be a :class:`User` instance."""
-
- # Attempt authentication against each authenticator in turn,
- # and return None if no authenticators succeed in authenticating the request.
- for authenticator in as_tuple(self.authenticators):
- auth_context = authenticator(self).authenticate(request)
- if auth_context:
- return auth_context
-
- return None
-
-
class BaseAuthenticator(object):
"""All authenticators should extend BaseAuthenticator."""