cas logout跳转到指定页面(带service)

1.server 端

修改src\main\webapp\WEB-INF\cas-servlet.xml里的logoutController

增加p:followServiceRedirects="true"使支持logout输入service参数为跳转路径。

  1. <bean id="logoutController" class="org.jasig.cas.web.LogoutController"  

  2. p:centralAuthenticationService-ref="centralAuthenticationService"  

  3. p:logoutView="casLogoutView"  

  4. p:warnCookieGenerator-ref="warnCookieGenerator"  

  5. p:ticketGrantingTicketCookieGenerator-ref="ticketGrantingTicketCookieGenerator"   

  6. p:followServiceRedirects="true"  

  7. />

2.客户端

web.xml 中在登录的filter之前增加

  1.   

  2.     <listener>  

  3.     <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListenerlistener-class>  

  4. listener>   

  5. <filter>  

  6.    <filter-name>CAS Single Sign Out Filterfilter-name>  

  7.    <filter-class>org.jasig.cas.client.session.SingleSignOutFilterfilter-class>  

  8. filter>  

  9. <filter-mapping>  

  10.    <filter-name>CAS Single Sign Out Filterfilter-name>  

  11.    <url-pattern>/*url-pattern>  

  12. filter-mapping>

3.非SSL(server端)

ticketGrantingTicketCookieGenerator.xml  --> p:cookieSecure="false"

你可能感兴趣的:(cas)