diff options
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.  | 
