Class CompositeSessionAuthenticationStrategy
java.lang.Object
com.appiancorp.suiteapi.common.spring.security.CompositeSessionAuthenticationStrategy
- All Implemented Interfaces:
org.springframework.security.web.authentication.session.SessionAuthenticationStrategy
public class CompositeSessionAuthenticationStrategy
extends Object
implements org.springframework.security.web.authentication.session.SessionAuthenticationStrategy
Allows multiple
SessionAuthenticationStrategy
implementations to be executed as a single
SessionAuthenticationStrategy
. The delegate strategies are invoked sequentially in the
order that they were given; if an exception is thrown by one of the delegate classes, execution
stops and the exception is propagated.
Sample XML configuration:
<bean id="sessionAuthStrategy" class="com.appiancorp.suiteapi.common.spring.security.CompositeSessionAuthenticationStrategy">
<constructor-arg>
<list><ref bean="sessionFixationProtectionStrategy"/><ref bean="myCustomSessionStrategy"/></list>
</constructor-arg>
</bean>
<bean id="sessionFixationProtectionStrategy" class="org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy"/>
<bean id="myCustomSessionStrategy" class="com.example.security.auth.MyCustomSessionStrategy"/>
-
Constructor Summary
ConstructorDescriptionCompositeSessionAuthenticationStrategy
(List<org.springframework.security.web.authentication.session.SessionAuthenticationStrategy> delegateStrategies) Creates a new instance with the given delegate strategies which will be invoked when this strategy is executed. -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.springframework.security.web.authentication.session.SessionAuthenticationStrategy>
void
onAuthentication
(org.springframework.security.core.Authentication authentication, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) toString()
-
Constructor Details
-
CompositeSessionAuthenticationStrategy
public CompositeSessionAuthenticationStrategy(List<org.springframework.security.web.authentication.session.SessionAuthenticationStrategy> delegateStrategies) Creates a new instance with the given delegate strategies which will be invoked when this strategy is executed.
-
-
Method Details
-
onAuthentication
public void onAuthentication(org.springframework.security.core.Authentication authentication, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws org.springframework.security.web.authentication.session.SessionAuthenticationException - Specified by:
onAuthentication
in interfaceorg.springframework.security.web.authentication.session.SessionAuthenticationStrategy
- Throws:
org.springframework.security.web.authentication.session.SessionAuthenticationException
-
getDelegateStrategies
protected List<org.springframework.security.web.authentication.session.SessionAuthenticationStrategy> getDelegateStrategies() -
toString
-