aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/authentication.md
diff options
context:
space:
mode:
authorTom Christie2015-01-19 15:16:57 +0000
committerTom Christie2015-01-19 15:16:57 +0000
commit6065cdbd939542dec79708615bc3e75b38834f41 (patch)
treeb7e582185f1383d630dfe7b1fb8dc1e504599164 /docs/api-guide/authentication.md
parent4f3c3a06cfc0ea2dfbf46da2d98546664343ce93 (diff)
parentfdeef89ba79e617ea22dae68a0b42b3f60d67a4d (diff)
downloaddjango-rest-framework-6065cdbd939542dec79708615bc3e75b38834f41.tar.bz2
Merge master
Diffstat (limited to 'docs/api-guide/authentication.md')
-rwxr-xr-xdocs/api-guide/authentication.md5
1 files changed, 1 insertions, 4 deletions
diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md
index bb731817..ba114513 100755
--- a/docs/api-guide/authentication.md
+++ b/docs/api-guide/authentication.md
@@ -34,7 +34,7 @@ The value of `request.user` and `request.auth` for unauthenticated requests can
## Setting the authentication scheme
-The default authentication schemes may be set globally, using the `DEFAULT_AUTHENTICATION` setting. For example.
+The default authentication schemes may be set globally, using the `DEFAULT_AUTHENTICATION_CLASSES` setting. For example.
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
@@ -126,7 +126,6 @@ To use the `TokenAuthentication` scheme you'll need to [configure the authentica
'rest_framework.authtoken'
)
-
---
**Note:** Make sure to run `manage.py syncdb` after changing your settings. The `rest_framework.authtoken` app provides both Django (from v1.7) and South database migrations. See [Schema migrations](#schema-migrations) below.
@@ -249,8 +248,6 @@ Unauthenticated responses that are denied permission will result in an `HTTP 403
If you're using an AJAX style API with SessionAuthentication, you'll need to make sure you include a valid CSRF token for any "unsafe" HTTP method calls, such as `PUT`, `PATCH`, `POST` or `DELETE` requests. See the [Django CSRF documentation][csrf-ajax] for more details.
----
-
# Custom authentication
To implement a custom authentication scheme, 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.