Skip to content

Difference between 3.1.0 and 4.1.0 with respect to where the token is saved in the container #51

Answered by forgedhallpass
deepak229 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @deepak229,

the token was saved as a session attribute while we see that it is stored in InMemoryTokenHolder. Is that the case always or will it ever be written to session?

Starting from version 4.0 a new abstraction layer (LogicalSession) has been introduced to support both stateless and stateful web applications. This means that in case of stateless web apps, there is no container session to rely on. For this reason, the TokenService accesses tokens through the TokenHolder interface. The reference implementation for this interface is the InMemoryTokenHolder, which can serve both use cases, but you could also create your own implementation for it (e.g. a DatabaseTokenHolder).

Sav…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by forgedhallpass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants