Manage session with token

I"m going to use springboot to develop background for app
now the requirement is that sessionid is encapsulated in token, and session is stored in redis
app with token on each request.
I hope I can get the session of the current user by parsing the sessionid in token
can you give me a solution, as long as you can

Mar.02,2022

what you are talking about is exactly what JWT (JSON Web Token) implements, so you can take a look at it.


your requirement is very strange.
token is a substitute for session. Token is equivalent to session_id in a sense.
since you use session, why do you add a layer of token to make things happen?

Menu