Spring Acegi + JA-SIG CAS Java Client单点登出

测试环境:
JA-SIG CAS Server 3.1.2
JA-SIG CAS Java Client 3.1.2
JDK 1.5
Spring Acegi 1.0.5 + JA-SIG CAS Java Client 3.1.2做为客户端认证

单点登出配置参见:http://www.ja-sig.org/wiki/display/CASC/Configuring+Single+Sign+Out

说明:以上配置的单点登出并没有与Acegi有直接的关联,但确有相互影响,即以下提到的filter先后顺序。

注意事项:
 JA-SIG CAS Server 从3.1.2版本才能正常使用单点登出
 JA-SIG CAS Java Client中目前开源中只有JA-SIG CAS Client 支持单点登出
 客户端应用的web.xml中filter先后顺序, CAS Single Sign Out Filter相关配置放在securityFilter前面(至少其filter-mapping要在前)。

<filter>
   <filter-name>CAS Single Sign Out Filter</filter-name>   <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
</filter>
<filter>
<filter-name>securityFilter</filter-name> <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
<init-param>
<param-name>targetClass</param-name> <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
</init-param>
</filter>
<filter-mapping>
   <filter-name>CAS Single Sign Out Filter</filter-name>
   <url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>securityFilter</filter-name>
<url-pattern>/j_security_check</url-pattern>
</filter-mapping>
省略securityFilter的其他映射

你可能感兴趣的:(java,spring,jdk,Security,Acegi)