用cas实现Spring Switch用户过滤器

时间:2014-01-08 14:23:55

标签: java spring-security cas

我是Spring安全和cas的新手。 在我的项目中,我有一个cas(CenteralAuthenticationServer)服务器和一个服务服务器。 我想为我的应用程序中的某些用户实现Switch用户过滤器。 我应该把这些线放在哪里?

<bean id="switchUserProcessingFilter" class="org.springframework.security.web.authentication.switchuser.SwitchUserFilter">
 <property name="userDetailsService" ref="userDetailsService" />
 <property name="switchUserUrl" value="/j_spring_security_switch_user" />
 <property name="exitUserUrl" value="/j_spring_security_exit_user" />
 <property name="targetUrl" value="/index.jsp" />
</bean>

在我的cas项目或我的网络应用程序中? 我应该告诉tomcat在web.xml中使用这个过滤器吗? 有没有任何实现示例? 我应该创建java类来实现这个fitler吗?

1 个答案:

答案 0 :(得分:0)

将其添加到您的Web应用程序(dispatcher-servlet.xml)中。如果需要,请检查此示例。 switch user link