|
|
|
|
|
by TobyTheDog123
1255 days ago
|
|
I was under the impression sessions were just arbitrary tokens backed by some server-side logic (or perhaps a database) At its core isn't it possible to just take an object, encrypt it with a secret, store it client-side somewhere (cookies, localstorage, filesystem, printed-on-paper, whatever), send it back to the server, and it decrypts it? I don't quite see the difference (or benefits) of JWTs over something like that. |
|
For session, you need a centralized backend to access the data stored in the session. For JWT, you only need to verify the signature of the token to trust the data stored in JWT.
JWT solves the problem of having multiple separated service that need to share data.