pallets-eco / flask-jwt

JWT (JSON Web Tokens) for Flask applications
MIT License
564 stars 177 forks source link

Add better documentation for user_handler and current_user #9

Closed svenstaro closed 10 years ago

svenstaro commented 10 years ago

It appears there something like current_user from flask_login, sadly it doesn't appear to be documented. Could you add documentation on that?

Also, user_handler is not sufficiently documented, I think. Why do I need it if I already have the auth handler?

Tailzip commented 10 years ago

+1 Is there a way to access current_user in our app to get user infos ?

Here's what I need to implement : request a token (OK), then request current user infos like roles, or whatever I have in database regarding the token passed in headers. The _userhandler function is returning this but I don't know how I can access it ?

Thanks!

svenstaro commented 10 years ago

You can try importing current_user and try using it of course. Report results. :-)

Tailzip commented 10 years ago

That works, thank you! I didn't get the fact that I have to import it from flask_jwt... :)