A session based user authentication API
- app.py: API entry point
- auth.py: authentication model
- db.py: database model
- user.py: user model
- main.py: end-to-end integration tests
$ pip3 install -r requirements.txt
$ flask run
GET /
: returns logout message when user is logged outGET /profile
returns email of logged in userPOST /users
: creates new user (Form data:email
,password
)POST /sessions
: logs in existing user(Form data:email
,password
)POST /reset_password
: returns password reset token (Form data:email
)PUT /reset_password
: updates existing user's password (Form data:email
,new_password
,reset_token
)DELETE /sessions
: logs out user