部署到其他计算机时,CAS注销不起作用 [英] CAS logout not working when deploying to different machines

查看:278
本文介绍了部署到其他计算机时,CAS注销不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在同一台计算机上使用CAS服务器和我的应用程序,则注销对我来说工作正常。但是,如果CAS服务器部署在另一台计算机上,而我的应用程序部署在另一台计算机上,则cas注销无法正常工作。
我正在从应用程序中调用以下URL:

If I use CAS server and my application in the same machine, logout is working fine for me. But if CAS server is deployed on the different machine and my application is deployed on the different machine, then cas logout is not working. I am calling the following url from my application:

CAS Server URL: https://108.51.62.36:9443/cas/logout

我在网上有以下条目我的应用程序的.xml:

And I have got the following entries in web.xml of my application:

<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>

<!-- Included to support Single Logout. Note that the SingleSignOutFilter 
    is included in the springSecurityFilterChain. However, it could also be placed 
    as the first filter-mapping in the web.xml -->
<listener>
    <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
</listener>


推荐答案

使用CAS时,这将创建一个安全的cookie域。您可以在WEB-INF / spring-configuration中查看值并进行修改:

Whe you use CAS, this create a secure cookie domain. You can see the value and modify in WEB-INF/spring-configuration:


  • ticketGrantingTicketCookieGenerator.xml

  • warnCookieGenerator.xml

因此,我建议不要使用Ip。使用其他类似 https://my.domaing.com:9443/cas/logout

So, I suggest don't use Ip. Use another like https://my.domaing.com:9443/cas/logout

这篇关于部署到其他计算机时,CAS注销不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆