Python Flask-Security Example

This is working example of login for flask framework based on Flask-Security extention. The example based on this blog
The example tested on python 3.5.1 with PyCharm on windows.


How to run this example?

Open cmd and run:
1. cd /path-to-dir/
2. pip install -r ./requirements.txt
3. python run.py

Open another CMD and run:

  1. cd /path-to-dir/
  2. http 127.0.0.1:5001/dummy-api-anonymous/
  3. http -a test@example.com:test123 127.0.0.1:5001/dummy-api-http/
  4. python get_token.py
  5. http 127.0.0.1:5001/dummy-api-token/ Authentication-Token:

The result need to be like this image:





If you want to read more about me go to my site.