diff options
| author | Tom Christie | 2012-10-17 14:59:53 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-10-17 14:59:53 +0100 | 
| commit | 5ae49a4ec4ccfdab13bc848ecd175d44ecaf4ed1 (patch) | |
| tree | 975467fd332b2dc0d89d73f2c473d9b49182662c /rest_framework/authentication.py | |
| parent | 4c17d1441f184eabea9000155f07445bcc2aa14c (diff) | |
| download | django-rest-framework-5ae49a4ec4ccfdab13bc848ecd175d44ecaf4ed1.tar.bz2 | |
Add docs for 401 vs 403 responses
Diffstat (limited to 'rest_framework/authentication.py')
| -rw-r--r-- | rest_framework/authentication.py | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index 30c78ebc..e557abed 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -21,6 +21,14 @@ class BaseAuthentication(object):          """          raise NotImplementedError(".authenticate() must be overridden.") +    def authenticate_header(self, request): +        """ +        Return a string to be used as the value of the `WWW-Authenticate` +        header in a `401 Unauthenticated` response, or `None` if the +        authentication scheme should return `403 Permission Denied` responses. +        """ +        pass +  class BasicAuthentication(BaseAuthentication):      """ | 
