读书人

cas调整spring配置

发布时间: 2012-12-21 12:03:49 作者: rapoo

cas整合spring配置
<?xml version="1.0"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
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-3.0.xsd http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.xsd">

<security:http auto-config="false" entry-point-ref="casEntryPoint">
<security:form-login login-page="/login.jsp"/>
<security:intercept-url pattern="/login.jsp*" filters="none"/>
<security:intercept-url pattern="/**" access="ROLE_USER"></security:intercept-url>
<security:custom-filter position="CAS_FILTER" ref="casFilter"></security:custom-filter>
<security:custom-filter before="LOGOUT_FILTER" ref="requestSingleLogoutFilter"/>
<security:custom-filter before="CAS_FILTER" ref="singleLogoutFilter"/>
</security:http>

<!-- 配置认证管理器 -->
<security:authentication-manager alias="casAuthenticationManager">
<security:authentication-provider ref="casAuthenticationProvider"></security:authentication-provider>
</security:authentication-manager>


<bean id="serviceProperties" value="http://ufseih8dqtzu33z:8099/soos/j_spring_cas_security_check"></property>
<property name="sendRenew" value="false"></property>
</bean>

<bean id="casEntryPoint" value="https://ufseih8dqtzu33z:8443/cas/login"></property>
<property name="serviceProperties" ref="serviceProperties"></property>
</bean>


<bean id="casFilter" ref="casAuthenticationManager"></property>
<property name="authenticationSuccessHandler" ref="authenticationSuccessHandler"></property>
<property name="authenticationFailureHandler" ref="authenticationFailureHandler"></property>
</bean>

<bean id="authenticationSuccessHandler" />
<bean id="authenticationFailureHandler" value="/casfailed.jsp"/>
</bean>

<bean id="casAuthenticationProvider" ref="userService"/>
<property name="serviceProperties" ref="serviceProperties"></property>
<property name="ticketValidator">
<bean value="https://ufseih8dqtzu33z:8443/cas" />
</bean>
</property>
<property name="key" value="an_id_for_this_auth_provider_only"></property>
</bean>

<bean id="userService" value="/j_spring_cas_serurity_logout"/>
</bean>

</beans>

读书人网 >编程

热点推荐