开发者

TGT expiring if we are using app1 and not using other

开发者 https://www.devze.com 2023-03-10 22:41 出处:网络
we have a question about ticket-granting tickets expiration policy. We are using cas authentication. The TGT expires after 2 hours whereas java session exiperes after 30 minutes.Our problem is that if

we have a question about ticket-granting tickets expiration policy. We are using cas authentication. The TGT expires after 2 hours whereas java session exiperes after 30 minutes.Our problem is that if a user works only using a web application more than two hours and than tries to use another web application, the ticket-granting ticket is expired and so the user must re-login, although he can work in the first web application.

Is there a way to renew ticket-granting ticket while the user is working in the 开发者_如何学运维first web application??


Sadly, short of doing some magic, as of CAS 3.4 (when I was looking into a very similar problem) the answer is no.

If you absolutely have to implement this feature, the best idea I've run across (a co-worker came up with it, not me) was to have every page of your apps use Javascript to "ping" your CAS server (a simple AJAX request that doesn't care about the return will work), and implement a custom TGT Expiration Policy that keeps track of the last ping-back and expires the ticket if the last ping was more than X seconds ago. However, this approach requires a considerable amount of hooks into the CAS framework and I would recommend against it. I'd provide code but it has been too long since I really dug into CAS's internals.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号