1.server 端
修改src\main\webapp\WEB-INF\cas-servlet.xml里的logoutController
增加p:followServiceRedirects="true"使支持logout输入service参数为跳转路径。
-
<bean id="logoutController" class="org.jasig.cas.web.LogoutController"
-
p:centralAuthenticationService-ref="centralAuthenticationService"
-
p:logoutView="casLogoutView"
-
p:warnCookieGenerator-ref="warnCookieGenerator"
-
p:ticketGrantingTicketCookieGenerator-ref="ticketGrantingTicketCookieGenerator"
-
p:followServiceRedirects="true"
-
/>
2.客户端
web.xml 中在登录的filter之前增加
-
<!--单点退出配置-->
-
<listener>
-
<listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
-
</listener>
-
<filter>
-
<filter-name>CAS Single Sign Out Filter</filter-name>
-
<filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
-
</filter>
-
<filter-mapping>
-
<filter-name>CAS Single Sign Out Filter</filter-name>
-
<url-pattern>/*</url-pattern>
-
</filter-mapping>
3.非SSL(server端)
ticketGrantingTicketCookieGenerator.xml --> p:cookieSecure="false"