diff options
| author | Tom Christie | 2012-10-15 13:27:50 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-10-15 13:27:50 +0100 | 
| commit | 9c1fba3483b7e81da0744464dcf23a5f12711de2 (patch) | |
| tree | d9370dc9fb9d2fea65192bf5ce4d7fb594d3ad0c /docs/api-guide/authentication.md | |
| parent | e88ca9637bd4f49659dd80ca7afd0f38adf07746 (diff) | |
| download | django-rest-framework-9c1fba3483b7e81da0744464dcf23a5f12711de2.tar.bz2 | |
Tweak parsers to take parser_context
Diffstat (limited to 'docs/api-guide/authentication.md')
| -rw-r--r-- | docs/api-guide/authentication.md | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index ae21c66e..71f48163 100644 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -60,6 +60,8 @@ Or, if you're using the `@api_view` decorator with function based views.          }          return Response(content) +# API Reference +  ## BasicAuthentication  This policy uses [HTTP Basic Authentication][basicauth], signed against a user's username and password.  Basic authentication is generally only appropriate for testing. @@ -113,7 +115,7 @@ If successfully authenticated, `SessionAuthentication` provides the following cr  * `request.user` will be a `django.contrib.auth.models.User` instance.  * `request.auth` will be `None`. -## Custom authentication policies +# Custom authentication  To implement a custom authentication policy, subclass `BaseAuthentication` and override the `.authenticate(self, request)` method.  The method should return a two-tuple of `(user, auth)` if authentication succeeds, or `None` otherwise. | 
