CAS如何处理会话超时

发布于 2024-11-19 13:58:38 字数 195 浏览 3 评论 0原文

我对CAS的理解:

有1个CAS服务器和2个CAS客户端,

client1通过CAS登录成功 用户在 client1 上工作,因此 client1 的会话由用户操作刷新。但CAS服务器会话超时。 用户尝试访问client2,检查CAS时发现会话超时,需要重新登录,但client1已经登录。

这没有道理,如果我错了,请纠正我。

My understanding about CAS:

Have 1 CAS server and 2 CAS client,

client1 login success through CAS
user works on client1, so client1's session is refreshed by user action. But CAS server session timeout.
user try access client2, when check CAS found the session is timeout, so need login again, but the client1 is already login.

It does not make sense, please correct me if i am wrong.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

慈悲佛祖 2024-11-26 13:58:38

CAS 使用“服务”来区分网站。在 cas 内,将有一个“client1”服务和一个“client2”服务,每个服务都有自己的 TicketGrantingTicket。会话超时通过此处描述的 TGT 的 CAS 服务器票证过期策略进行控制:

https: //wiki.jasig.org/display/CASUM/Ticket+Expiration+Policy

这样,每个服务器都会有自己的超时时间。因此,当我转到 client1 并单击链接时,这不会对 client2 的会话超时产生影响。

如果您希望这两个网站影响其超时,则需要让它们使用相同的服务并调查代理授予票证的使用:

https://wiki.jasig.org/display/CAS/Proxy+CAS+演练

CAS uses "services" to differentiate the websites. Within cas there would be a "client1" service and a "client2" service, each with their own TicketGrantingTicket. The session timeout is controlled through the CAS servers ticket expiration policy for TGT's described here:

https://wiki.jasig.org/display/CASUM/Ticket+Expiration+Policy

In this way, each of the servers would have their own timeout. So when I go to client1 and click a link, this would have no effect on the session timeout for client2.

If you wanted the two websites to affect their timeouts, you'll need to make them use the same service and investigate the use of Proxy Granting tickets:

https://wiki.jasig.org/display/CAS/Proxy+CAS+Walkthrough

我要还你自由 2024-11-26 13:58:38

Client1 可能仍处于登录状态的原因是,您没有处理 CAS 在用户的 TicketGrantingTicket 过期时发出的注销帖子。

当 CAS 中发生注销事件时,它会向所有已注册的服务发送注销帖子。 Client1 需要通过查看请求来处理此问题。如果您碰巧使用 PHP,则需要查看 $_REQUEST 以获得注销消息。

The reason Client1 might still be logged in is because you are not handling the logout post that CAS sends out when it expires a user's TicketGrantingTicket.

When a logout event happens in CAS it sends a logout post to all it's registered services. Client1 needs to handle this by looking at the request. If by chance you are using PHP you need to take a look at $_REQUEST for a logout message.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文