About the usage of JWT

https://codeshelper.com/a/11...
according to this tutorial, I have all worked out, and I have got token for my login

{
    "token": "bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbHZtYW4uY24vYXBpL2F1dGgvbG9naW4iLCJpYXQiOjE1NTAwMzQ2MzYsImV4cCI6MTU1MDAzODIzNiwibmJmIjoxNTUwMDM0NjM2LCJqdGkiOiIwSGxsM0RMN053R29GeHhmIiwic3ViIjoxLCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIn0.DmgY-_FeXATX2RajrILNnJhqtbXEN7Uj7pEzNbunz5U"
}

then I have a question, how should I use this token? my API is mainly provided for Android APP. For example, what should I do with this token after I log in? do I need to decrypt it?

Jun.14,2022

in that tutorial, decryption has been implemented automatically on the server side, that is, the process of verifying the validity of token. So, after you get the token, you only need to add Authentication "bearer eyJ0." to the Header in subsequent requests, all requests that require authentication permissions. That way, only users who have successfully logged in can call your server API.

Menu