aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/authentication.md
diff options
context:
space:
mode:
authorTom Christie2012-10-15 13:27:50 +0100
committerTom Christie2012-10-15 13:27:50 +0100
commit9c1fba3483b7e81da0744464dcf23a5f12711de2 (patch)
treed9370dc9fb9d2fea65192bf5ce4d7fb594d3ad0c /docs/api-guide/authentication.md
parente88ca9637bd4f49659dd80ca7afd0f38adf07746 (diff)
downloaddjango-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.md4
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.