Skip to content

Problems with caching when SecurityContextHolder.MODE_INHERITABLETHREADLOCAL enabled #206

Answered by ch4mpy
xelahalo asked this question in Q&A
Discussion options

You must be logged in to vote

pass down the authentication object from the controller, instead of trying to inherit context and get it from SecurityContextHolder

This is something I almost always do, reason why I never faced the kind of issue you are reporting. That said, it doesn't seem legit to get an outdated Authentication instance from the SecurityContext.

I don't think that spring-addons can do much about the issue you report (not sure it can be fixed with just configuration). Maybe would it be worth to ask a question on stackoverflow (and later an issue on Spring Security repo if you don't get any useful answer from SO)?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xelahalo
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