当前位置:编程学习 > JAVA >>

求大神解决CAS与spring Security2.0问题

最近一直在研究CAS整合spring Security2.0,遇到了不少问题,网上的关于2.0的帖子实在太少了
我配置了applicationContext-springSecurity.xml文件,但是登录完CAS后,出现了页面重定向循环,求大神帮忙指点指点,我的xml是:

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
    
    
<!-- http安全配置 entry-point-ref="authenticationProcessingFilterEntryPoint"-->
<http entry-point-ref="casEntryPoint" > 
<logout logout-success-url="/cas-logout.jsp" logout-url="/logout" />
 <intercept-url pattern="/**" access="ROLE_USER"/>
 
<concurrent-session-control max-sessions="1" exception-if-maximum-exceeded="false" /> 
</http>

<authentication-manager alias="authenticationManager"/>  
      
    <beans:bean id="casEntryPoint"  
        class="org.springframework.security.ui.cas.CasProcessingFilterEntryPoint">  
        <beans:property name="loginUrl"  
            value="http://vest.cn:8080/cas/login" />  
        <beans:property name="serviceProperties"  
            ref="serviceProperties" />  
    </beans:bean>   
    
    <beans:bean id="serviceProperties"  
        class="org.springframework.security.ui.cas.ServiceProperties">  
        <beans:property name="service"  
            value="http://vest.cn:8080/xxx/login" />  
        <beans:property name="sendRenew" value="false" />  
    </beans:bean> 
    
    <beans:bean id="casProcessingFilter"
class="org.springframework.security.ui.cas.CasProcessingFilter">
<custom-filter after="CAS_PROCESSING_FILTER" />
<beans:property name="authenticationManager" ref="authenticationManager" />
<beans:property name="defaultTargetUrl" value="http://vest.cn:8080/xxx/login" />
</beans:bean>
                <beans:bean id="casAuthenticationProvider"
class="org.springframework.security.providers.cas.CasAuthenticationProvider">
<custom-authentication-provider />
<beans:property name="userDetailsService" ref="userDetailsService" />
<beans:property name="serviceProperties" ref="serviceProperties" />
<beans:property name="ticketValidator">
<beans:bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
<beans:constructor-arg index="0"
value="http://vest.cn:8080/cas" />
</beans:bean>
</beans:property>
<beans:property name="key" value="etlvp" />
</beans:bean>


     
      <beans:bean id="userDetailsService "
class="com.xxx.rmplatform.security.userdetails.impl.UserDetailsHibernateImpl">
<beans:property name="userService" ref="userService" />
<beans:property name="userDaoLdap" ref="userDaoLdap" />
</beans:bean>
<beans:bean id="md5PasswordEncoder"
class="com.xxx.rmplatform.components.security.userdetails.impl.ExpandPasswordEncoder" />
   
</beans:beans> spring security 安全 xml CAS filter --------------------编程问答-------------------- 顶11111111111111111111111 --------------------编程问答-------------------- 有个同事实现过 CAS 假期后可以帮你问问
补充:Java ,  Web 开发
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,