Adjusted client JWT example (#5944)

This commit is contained in:
Jochen Wersdörfer 2018-04-20 15:33:59 +02:00 committed by Carlton Gibson
parent 2ebd479759
commit c4676510fd

View File

@ -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(