org.springframework.flex.security3
Class EndpointInterceptor

java.lang.Object
  extended by org.springframework.security.access.intercept.AbstractSecurityInterceptor
      extended by org.springframework.flex.security3.EndpointInterceptor
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.MessageSourceAware, MessageInterceptor

public class EndpointInterceptor
extends org.springframework.security.access.intercept.AbstractSecurityInterceptor
implements MessageInterceptor

Security interceptor that secures messages being passed to BlazeDS endpoints based on the security attributes configured for the endpoint being invoked.

Author:
Jeremy Grelle

Field Summary
 
Fields inherited from class org.springframework.security.access.intercept.AbstractSecurityInterceptor
logger, messages
 
Constructor Summary
EndpointInterceptor()
           
 
Method Summary
 void afterPropertiesSet()
           
 EndpointSecurityMetadataSource getObjectDefinitionSource()
           
 java.lang.Class getSecureObjectClass()
          
 org.springframework.security.access.SecurityMetadataSource obtainSecurityMetadataSource()
          
 flex.messaging.messages.Message postProcess(MessageProcessingContext context, flex.messaging.messages.Message inputMessage, flex.messaging.messages.Message outputMessage)
          Hook for post-processing the outgoing AMF Message
 flex.messaging.messages.Message preProcess(MessageProcessingContext context, flex.messaging.messages.Message inputMessage)
          Hook for pre-processing the incoming AMF Message
 void setObjectDefinitionSource(EndpointSecurityMetadataSource newSource)
          Sets the EndpointSecurityMetadataSource for the endpoint being secured
 
Methods inherited from class org.springframework.security.access.intercept.AbstractSecurityInterceptor
afterInvocation, beforeInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointInterceptor

public EndpointInterceptor()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class org.springframework.security.access.intercept.AbstractSecurityInterceptor
Throws:
java.lang.Exception

getObjectDefinitionSource

public EndpointSecurityMetadataSource getObjectDefinitionSource()

getSecureObjectClass

public java.lang.Class getSecureObjectClass()

Specified by:
getSecureObjectClass in class org.springframework.security.access.intercept.AbstractSecurityInterceptor

obtainSecurityMetadataSource

public org.springframework.security.access.SecurityMetadataSource obtainSecurityMetadataSource()

Specified by:
obtainSecurityMetadataSource in class org.springframework.security.access.intercept.AbstractSecurityInterceptor

postProcess

public flex.messaging.messages.Message postProcess(MessageProcessingContext context,
                                                   flex.messaging.messages.Message inputMessage,
                                                   flex.messaging.messages.Message outputMessage)
Hook for post-processing the outgoing AMF Message

Specified by:
postProcess in interface MessageInterceptor
Parameters:
context - context for the current request
inputMessage - the incoming AMF message
outputMessage - the outgoing AMF message
Returns:
the AMF message to send in response

preProcess

public flex.messaging.messages.Message preProcess(MessageProcessingContext context,
                                                  flex.messaging.messages.Message inputMessage)
Hook for pre-processing the incoming AMF Message

Specified by:
preProcess in interface MessageInterceptor
Parameters:
context - context for the current request
inputMessage - the incoming AMF message
Returns:
the AMF message to process in the current request

setObjectDefinitionSource

public void setObjectDefinitionSource(EndpointSecurityMetadataSource newSource)
Sets the EndpointSecurityMetadataSource for the endpoint being secured

Parameters:
newSource - the endpoint definition source