Skip to content
/ demo_app Public

Test hashing schemes performance for flask-security token

License

Notifications You must be signed in to change notification settings

jms/demo_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

demo_app

Setup:

  • Create a empty postgresql database

  • Create the dot env file

touch .flaskenv  # or touch .env

add to the .flaskenv file the required variables:

FLASK_ENV=development
FLASK_DEBUG=1
SQLALCHEMY_DATABASE_URI=postgresql://username:password@host:5432/database
SECRET_KEY=<secret key>
SALT=<salt key>

Run:

poetry install  # install packages
poetry run flask run  # run the app

test:

bash$ time -p curl -H "Content-Type: application/json" \
-X POST -d '{"email":"test@example.com","password":"test"}' \
http://127.0.0.1:5000/login
{
  "meta": {
    "code": 200
  },
  "response": {
    "user": {
      "authentication_token": "<token>",
      "id": "1"
    }
  }
}
bash$ time -p curl -H 'Authentication-Token:<token>' http://localhost:5000/hello
{
  "hello": "world"
}
real 0.02
user 0.00
sys 0.00

About

Test hashing schemes performance for flask-security token

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published