From 6952b965c2854a35d0e724b67d2cf95a91be0934 Mon Sep 17 00:00:00 2001 From: Aitzol Date: Thu, 29 May 2014 14:32:49 +0200 Subject: [PATCH] Add info about TokenAuthentication schema --- docs/api-guide/authentication.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index 88a7a0119..2d7fe396e 100755 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -126,6 +126,15 @@ To use the `TokenAuthentication` scheme, include `rest_framework.authtoken` in y 'rest_framework.authtoken' ) +Also you need to enable `TokenAuthentication` from `rest_framework.authentication`in the `REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES` list: + + REST_FRAMEWORK = { + 'DEFAULT_AUTHENTICATION_CLASSES': ( + ... + 'rest_framework.authentication.TokenAuthentication', + ... + )} + Make sure to run `manage.py syncdb` after changing your settings. The `authtoken` database tables are managed by south (see [Schema migrations](#schema-migrations) below). You'll also need to create tokens for your users.