- clone the repo and
CD
into the folder python3 -m venv env
pip install -r requirements.txt
python3 app.py
- Login to get JWT. (123456 is hard coded password)
curl --location --request POST 'http://127.0.0.1:5000/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"un":"noman",
"pwd": "123456"
}'```
2. access restriced end point with the token
```curl --location --request GET 'http://127.0.0.1:5000/auth?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MDQwNTUzMjIsInVzZXIiOiJub21hbiJ9.DSr27L5qHYXWcGw99PgSkBj2iUqWOh5n0Kyi04vS2FA'```