/interview-auth

Basic auth API for interviewing front end engineers

Primary LanguagePython

interview-auth

Authentication API

Setup

  1. python3 -m venv venv-interview-auth
  2. source venv-interview-auth/bin/activate
  3. pip install --upgrade pip; pip install -r requirements.txt -r test_requirements.txt

Run The Tests

  1. pytest test

Start the server

  1. FLASK_APP=server.py flask run

Sample requests

  1. Create account: curl localhost:5000/v3/accounts -X POST --header 'Content-type: application/json' --data '{"email": "gsinkin@earnup.com", "password": "Password1!"}'
  2. Login: curl localhost:5000/v3/accounts/login -X POST --header 'Content-type: application/json' --data '{"email": "gsinkin@earnup.com", "password": "Password1!"}'
  3. Logout: curl localhost:5000/v3/accounts/logout --header 'Content-type: application/json' --header 'X-API-Key: a19f0000-28cc-4288-949b-1024dde58629'