public class CompositeSessionAuthenticationStrategy
extends java.lang.Object
implements org.springframework.security.web.authentication.session.SessionAuthenticationStrategy
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 and Description |
---|
CompositeSessionAuthenticationStrategy(java.util.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.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<org.springframework.security.web.authentication.session.SessionAuthenticationStrategy> |
getDelegateStrategies() |
void |
onAuthentication(org.springframework.security.core.Authentication authentication,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
toString() |
public CompositeSessionAuthenticationStrategy(java.util.List<org.springframework.security.web.authentication.session.SessionAuthenticationStrategy> delegateStrategies)
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
onAuthentication
in interface org.springframework.security.web.authentication.session.SessionAuthenticationStrategy
org.springframework.security.web.authentication.session.SessionAuthenticationException
protected java.util.List<org.springframework.security.web.authentication.session.SessionAuthenticationStrategy> getDelegateStrategies()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.