python - Using Flask-Security to authenticate REST API -
i using flask-security build web app has public rest api. trying figure out how add user registration , login using rest calls only. easy create user using user_datastore.create_user
. how can login user, using rest call?
if flask_security.utils.login_user
took username+password or token argument, easy, takes user object instead? documentation shows how register , login using forms , views, need able register , login ios device (using restkit).
you either want use flask_security.decorators.auth_token_required
along security_token_authentication_key
or security_token_authentication_header
(depending on whether want pass token in url or in header) or can override flask_security.core.usermixin.get_auth_token
user
class , flask-security right thing.
Comments
Post a Comment