E
E
Eugenue Cesarevich2021-03-26 19:53:07
Java
Eugenue Cesarevich, 2021-03-26 19:53:07

How is JWT generated?

I have a Java server, I generate a token using the io.jsonwebtoken. The token is generated based on the user's login. As far as I understand, the hashing algorithm does not change from time to time, that is, it turns out that the token also never changes? Thus, the situation with a once-compromised token can only be resolved by changing the login?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2021-03-26
@cot_shaurma

The token includes a timestamp up to which it is valid.

O
Orkhan, 2021-03-26
Hasanly @azerphoenix

For clarity, take a look at site
https://jwt.io/
You will see that jwt consists of 3 parts.
Pay attention to this part
https://i.imgur.com/cZLrN7Y.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question