org.springframework.integration.security.channel
Class SecurityContextPropagatingChannelInterceptor

java.lang.Object
  extended by org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
      extended by org.springframework.integration.security.channel.SecurityContextPropagatingChannelInterceptor
All Implemented Interfaces:
ChannelInterceptor

public class SecurityContextPropagatingChannelInterceptor
extends ChannelInterceptorAdapter

Propagates the SecurityContext associated with the current thread (if any) by adding it to the header of sent messages.

Author:
Jonas Partner

Field Summary
private  org.apache.commons.logging.Log logger
           
 
Constructor Summary
SecurityContextPropagatingChannelInterceptor()
           
 
Method Summary
protected  Message<?> createSecurityContextMessageIfPossible(Message<?> message)
           
 Message<?> preSend(Message<?> message, MessageChannel channel)
           
 
Methods inherited from class org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter
postReceive, postSend, preReceive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private final org.apache.commons.logging.Log logger
Constructor Detail

SecurityContextPropagatingChannelInterceptor

public SecurityContextPropagatingChannelInterceptor()
Method Detail

preSend

public Message<?> preSend(Message<?> message,
                          MessageChannel channel)
Specified by:
preSend in interface ChannelInterceptor
Overrides:
preSend in class ChannelInterceptorAdapter

createSecurityContextMessageIfPossible

protected Message<?> createSecurityContextMessageIfPossible(Message<?> message)