mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-04 04:13:16 +03:00
Update authentication.md (#6291)
This commit is contained in:
parent
67e99a29b8
commit
40da2a21ef
|
@ -137,7 +137,7 @@ You'll also need to create tokens for your users.
|
||||||
from rest_framework.authtoken.models import Token
|
from rest_framework.authtoken.models import Token
|
||||||
|
|
||||||
token = Token.objects.create(user=...)
|
token = Token.objects.create(user=...)
|
||||||
print token.key
|
print(token.key)
|
||||||
|
|
||||||
For clients to authenticate, the token key should be included in the `Authorization` HTTP header. The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example:
|
For clients to authenticate, the token key should be included in the `Authorization` HTTP header. The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user