【问题标题】:Implementing Spring Switch User Filter with cas用 cas 实现 Spring Switch 用户过滤器
【发布时间】:2014-01-26 17:00:56
【问题描述】:

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

<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 项目中还是在我的 Web 应用程序中? 我应该告诉tomcat 在web.xml 中使用这个过滤器吗? 有没有实现的例子? 我应该创建 java 类来实现这个 fitler 吗?

【问题讨论】:

    标签: java spring-security cas


    【解决方案1】:

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

    【讨论】:

    • 您的答案中的一些示例代码会很好。链接可能会过时
    猜你喜欢
    • 2011-03-17
    • 1970-01-01
    • 2018-12-30
    • 1970-01-01
    • 1970-01-01
    • 2014-03-02
    • 2019-04-06
    • 2016-12-04
    • 2014-11-22
    相关资源
    最近更新 更多