Web Services and Cloud-based Systems course Project
API Functions:
- create user account
- update user password
- login verification
- validate JWT
Additional Features:
- Check login expiry time
JWT: JWT official introduction: link Python hmac library introduction: link
Docker
installedPython >= 3.4
installed
After successfully installed these modules, enter directory /src
, run the python file run.py
$ python3 run.py
API | Parameter | Method | Example | Description |
---|---|---|---|---|
/ | / | GET | 127.0.0.1:7777 | Server connected information |
/users | [?username=...&password=...] | POST | 127.0.0.1:7777/users?username=test&password=test | create a user account |
/users | [?username=...&old-password=...&new-password=...] | PUT | 127.0.0.1:7777/users?username=test&old-password=test&new-password=newtest | Update passowrd |
/users/login | [?username=...&password=...] | POST | 127.0.0.1:7777/users/login?username=test&password=test | Login and get JWT |
/users/validation | [?jwt=...] | GET | 127.0.0.1:7777/users/validation?jwt=eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJuYW1lIjogIkNhaSJ9.MK_ds0u2DsMteRixl1SX1IdInRd73j1p3qNQFOW7yG4 | Validate login status and get username |