-
Notifications
You must be signed in to change notification settings - Fork 11
Security Web
duantihua edited this page Feb 18, 2013
·
1 revision
权限系统集成cas需要进行以下配置 pom.xml文件添加以下依赖:
<dependency>
<groupId>org.beangle.security</groupId>
<artifactId>beangle-security-web</artifactId>
<version>${project.version}</version>
</dependency>全局spring-config.xml中增加以下bean定义:
<bean id="casConfig" class="org.beangle.security.cas.CasConfig">
<property name="casServer" value="http://some.host/cas"/>
</bean>
<bean id="securityFilterChain">
<property name="filters">
<list>
<ref bean="httpSessionContextIntegrationFilter" />
<ref bean="exceptionTranslationFilter" />
<ref bean="casPreauthFilter" />
<ref bean="filterSecurityInterceptor" />
</list>
</property>
</bean>
<bean id="authenticationmanager">
<property name="providers">
<list>
<ref bean="preauthUserDetailProvider" />
<ref bean="casAuthenticationProvider" />
<ref bean="daoUserProvider" />
</list>
</property>
</bean>
<bean id="exceptionTranslationFilter">
<property name="authenticationEntryPoint" ref="casEntryPoint" />
</bean>如果支持东软自定义的实现则需要更改bean定义如下:
<bean id="authenticationAliveChecker" class="org.beangle.security.cas.auth.vendor.NeusoftCasAliveChecker">
<property name="config" ref="casConfig"/>
</bean>
<bean id="casTicketValidator" class="org.beangle.security.cas.auth.vendor.NeusoftCasTicketValidatorFactory">
<property name="proxyGrantingTicketStorage" ref="proxyGrantingTicketStorage"/>
<property name="config" ref="casConfig"/>
</bean>