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 MessageChannel
s 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(Message<?> message,
MessageChannel channel,
MessageHandler handler,
Exception ex) |
protected org.springframework.security.core.Authentication |
obtainPropagatingContext(Message<?> message,
MessageChannel channel) |
protected void |
populatePropagatedContext(org.springframework.security.core.Authentication authentication,
Message<?> message,
MessageChannel channel) |
beforeHandle, postReceive, preSend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterReceiveCompletion, afterSendCompletion, postSend, preReceive
public SecurityContextPropagationChannelInterceptor()
public void afterMessageHandled(Message<?> message, MessageChannel channel, MessageHandler handler, Exception ex)
afterMessageHandled
in interface ExecutorChannelInterceptor
afterMessageHandled
in class ThreadStatePropagationChannelInterceptor<org.springframework.security.core.Authentication>
protected org.springframework.security.core.Authentication obtainPropagatingContext(Message<?> message, MessageChannel channel)
obtainPropagatingContext
in class ThreadStatePropagationChannelInterceptor<org.springframework.security.core.Authentication>
protected void populatePropagatedContext(org.springframework.security.core.Authentication authentication, Message<?> message, MessageChannel channel)
populatePropagatedContext
in class ThreadStatePropagationChannelInterceptor<org.springframework.security.core.Authentication>