mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-24 15:33:17 +03:00
Adjusted client JWT example (#5944)
This commit is contained in:
parent
2ebd479759
commit
c4676510fd
|
@ -269,8 +269,8 @@ For example, using the "Django REST framework JWT" package
|
||||||
client = coreapi.Client()
|
client = coreapi.Client()
|
||||||
schema = client.get('https://api.example.org/')
|
schema = client.get('https://api.example.org/')
|
||||||
|
|
||||||
action = ['api-token-auth', 'obtain-token']
|
action = ['api-token-auth', 'create']
|
||||||
params = {username: "example", email: "example@example.com"}
|
params = {"username": "example", "password": "secret"}
|
||||||
result = client.action(schema, action, params)
|
result = client.action(schema, action, params)
|
||||||
|
|
||||||
auth = coreapi.auth.TokenAuthentication(
|
auth = coreapi.auth.TokenAuthentication(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user