Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README.rst with example authentication flow #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ahmed-shariff
Copy link

@ahmed-shariff ahmed-shariff commented Jun 1, 2019

Helps with #11

@codecov
Copy link

codecov bot commented Jun 1, 2019

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@6a30df4). Learn more about missing BASE report.
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##             master       #17   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?         3           
  Lines             ?        87           
  Branches          ?         9           
==========================================
  Hits              ?        87           
  Misses            ?         0           
  Partials          ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


Example authentication flow
===========================
1) Client sends username and password to DRF using a POST request.
Copy link

Choose a reason for hiding this comment

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

What endpoint you are talking about?
I don't understand

Copy link
Author

Choose a reason for hiding this comment

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

django-cognito-jwt doesn't handle logging in. Any user needs to be logged in with cognito separately. So as an example, I create an APIview which takes a username and password through POST, and use boto3 to authenticate the credentials and receive the tokens.

Choose a reason for hiding this comment

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

What to do next? the tokens not get authenticated by using the authentication_classes=[JSONWebTokenAuthentication]

Copy link
Author

Choose a reason for hiding this comment

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

To be honest, I haven't worked with this in more than 4 years. I am not even sure what this all about. Sorry about that.

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.

3 participants