aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/authentication.md
diff options
context:
space:
mode:
authorTom Christie2013-03-28 14:54:42 +0000
committerTom Christie2013-03-28 14:54:42 +0000
commitd243538547982781635e01d9b6e74afbbd628e16 (patch)
tree21d6ae8a922611257fd58f5fda156d2cfa4df69b /docs/api-guide/authentication.md
parentfb105d138cdcb178ed08c6616c0c25f4a03fb2e1 (diff)
downloaddjango-rest-framework-d243538547982781635e01d9b6e74afbbd628e16.tar.bz2
Note on using curl with token auth
Diffstat (limited to 'docs/api-guide/authentication.md')
-rw-r--r--docs/api-guide/authentication.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md
index 541c6575..757b8673 100644
--- a/docs/api-guide/authentication.md
+++ b/docs/api-guide/authentication.md
@@ -119,6 +119,8 @@ To use the `TokenAuthentication` scheme, include `rest_framework.authtoken` in y
...
'rest_framework.authtoken'
)
+
+Make sure to run `manage.py syncdb` after changing your settings.
You'll also need to create tokens for your users.
@@ -140,6 +142,10 @@ Unauthenticated responses that are denied permission will result in an `HTTP 401
WWW-Authenticate: Token
+The `curl` command line tool may be useful for testing token authenticated APIs. For example:
+
+ curl -X GET http://127.0.0.1:8000/api/example/ -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'
+
---
**Note:** If you use `TokenAuthentication` in production you must ensure that your API is only available over `https` only.