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

Endpoint for retrieving user by posting token #247

Open
csanders7070 opened this issue Apr 7, 2021 · 3 comments
Open

Endpoint for retrieving user by posting token #247

csanders7070 opened this issue Apr 7, 2021 · 3 comments

Comments

@csanders7070
Copy link

Hello,

I am trying to find a way to retrieve the user information by posting the token provided by django-knox to some endpoint. I know that I can do the opposite (post user information and get token to pass into headers, etc.), but I can't find anyway to retrieve the user information if all I have is the valid django-knox token. Thanks for the help

christian

@psibean
Copy link

psibean commented Apr 27, 2021

You should be able to just serialize request.user which will be your default user model, just ensure you only include the information you want to send back, e.g. no password

@csanders7070
Copy link
Author

csanders7070 commented Apr 27, 2021 via email

@AlexCernik
Copy link

How to create a function to check if user is authenticated??

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

No branches or pull requests

3 participants