public class SecurityContextPropagationChannelInterceptor extends ThreadStatePropagationChannelInterceptor<org.springframework.security.core.Authentication>
ExecutorChannelInterceptor implementation responsible for
the SecurityContext propagation from one message flow's thread to another
through the MessageChannels involved in the flow.
In addition this interceptor cleans up (restores) the SecurityContext
in the containers Threads for channels like
ExecutorChannel
and QueueChannel.
ThreadStatePropagationChannelInterceptor| Constructor and Description |
|---|
SecurityContextPropagationChannelInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterMessageHandled(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel,
org.springframework.messaging.MessageHandler handler,
java.lang.Exception ex) |
protected org.springframework.security.core.Authentication |
obtainPropagatingContext(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel) |
protected void |
populatePropagatedContext(org.springframework.security.core.Authentication authentication,
org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel) |
beforeHandle, postReceive, preSendpublic SecurityContextPropagationChannelInterceptor()
public void afterMessageHandled(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel,
org.springframework.messaging.MessageHandler handler,
java.lang.Exception ex)
afterMessageHandled in interface org.springframework.messaging.support.ExecutorChannelInterceptorafterMessageHandled in class ThreadStatePropagationChannelInterceptor<org.springframework.security.core.Authentication>protected org.springframework.security.core.Authentication obtainPropagatingContext(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel)
obtainPropagatingContext in class ThreadStatePropagationChannelInterceptor<org.springframework.security.core.Authentication>protected void populatePropagatedContext(org.springframework.security.core.Authentication authentication,
org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel)
populatePropagatedContext in class ThreadStatePropagationChannelInterceptor<org.springframework.security.core.Authentication>