Skip to content

Small example code fixes#5944

Merged
carltongibson merged 2 commits intoencode:masterfrom
ephes:api_client_topic_fix
Apr 20, 2018
Merged

Small example code fixes#5944
carltongibson merged 2 commits intoencode:masterfrom
ephes:api_client_topic_fix

Conversation

@ephes
Copy link
Copy Markdown
Contributor

@ephes ephes commented Apr 19, 2018

Description

Tried token authentication today and found those small errors. If it really should have ben JWT and you are using djangorestframework-simplejwt then the action should look more like this:

action = ['auth', 'token', 'obtain', 'create']

…really should have ben JWT and you are using djangorestframework-simplejwt then the action should look more like this:

action = ['auth', 'token', 'obtain', 'create']
Copy link
Copy Markdown
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ephes.

Thanks for this. All good except for the scheme change, which for "Django REST framework JWT" at least is JWT.

result = client.action(schema, action, params)

auth = coreapi.auth.TokenAuthentication(
scheme='JWT',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't right.

@carltongibson carltongibson added this to the 3.8.3 Release milestone Apr 20, 2018
@carltongibson carltongibson merged commit c467651 into encode:master Apr 20, 2018
@rpkilby rpkilby modified the milestones: 3.8.3 Release, 3.9 Release Aug 29, 2018
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants