现在的位置: 首页 > 综合 > 正文

cas logout以后转到原登录页

2013年02月18日 ⁄ 综合 ⁄ 共 563字 ⁄ 字号 评论关闭

如果不想用cas默认的log out页面,而是跳转到自己的登陆页,可以采用以下方式:

修改cas-server-webapp中的webapp/WEB-INF/cas-servlet.xml

将<bean id="logoutController" 下面的p:followServiceRedirects 设置为true。

即:

<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:servicesManager-ref="servicesManager"
        p:followServiceRedirects="true"/>

这样,当访问cas的logout页面,并且后面带有?service=xxx,就会跳转到xxx页面

抱歉!评论已关闭.