JWT
You can get it by using this
curl -X POST -H "Content-Type: application/json" -d '{"username": "jeremy", "password": "cheesecake"}' http://localhost/labs/api/login.php
Then you can view the json web token by decoding it using base64
echo eyJ1c2VyIjoiamVyZW15Iiwicm9sZSI6InN0YWZmIn0= | base64 -d
echo eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0= | base64 -d
After that you can also view the full details of that user
Just by pasting the JWT
curl -X GET "http://localhost/labs/api/account.php?token=eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0=.eyJ1c2VyIjoiamVyZW15Iiwicm9sZSI6InN0YWZmIn0=."
Last updated