Authentication API
python3 -m venv venv-interview-auth
source venv-interview-auth/bin/activate
pip install --upgrade pip; pip install -r requirements.txt -r test_requirements.txt
pytest test
FLASK_APP=server.py flask run
- Create account:
curl localhost:5000/v3/accounts -X POST --header 'Content-type: application/json' --data '{"email": "gsinkin@earnup.com", "password": "Password1!"}'
- Login:
curl localhost:5000/v3/accounts/login -X POST --header 'Content-type: application/json' --data '{"email": "gsinkin@earnup.com", "password": "Password1!"}'
- Logout:
curl localhost:5000/v3/accounts/logout --header 'Content-type: application/json' --header 'X-API-Key: a19f0000-28cc-4288-949b-1024dde58629'