You are right, it is ThreadLocal
no longer an option, because request processing is not tied to a specific thread.
Spring Security currently stores authentication information as an attribute ServerWebExchange
bound to the current side of the request / response. But you still need this information if you do not have direct access to the current exchange, for example @PreAuthorize
.
( Mono
Flux
), Reactor - , Subscriber
( -, HTTP- ).
SecurityContextHolder
, .
Reactor .
Spring .