Closed csanders7070 closed 4 months ago
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
Thanks so much. That worked exactly as I wanted. Sorry, that was simpler than I thought.
cas
On Tue, Apr 27, 2021 at 2:52 AM Psi @.***> wrote:
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
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/James1345/django-rest-knox/issues/247#issuecomment-827476199, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKRROV4Q5WKCABNFVNDHSLTK2CMRANCNFSM42RGZL6Q .
How to create a function to check if user is authenticated??
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