help with session expiration

164 views
Skip to first unread message

vallee.romain

unread,
Jan 6, 2022, 4:20:17 AM1/6/22
to CAS Community
Hello everyone.

I'm writing to you to get your opinion.
I would like to do something relatively simple I think, but I do not really know how to do it.
It's about the tickets.
I want when a user check the box "remember me" that his session is maintained for 3 weeks.
If he doesn't check this option, let his session be maintained for 24H, or until his browser is closed.

If you have an example of configuration in cas.properties, I am interested.

Thank you very much for your help.


Ray Bon

unread,
Jan 6, 2022, 2:10:38 PM1/6/22
to cas-...@apereo.org

My local settings are (I keep the times short so testing is easier):

# TGT Expiration Policy
# some hazelcast weird shit sets ticket expiration to this value regardless of any 
# other ttl setting, set it to a smidge longer than max lifetime
cas.ticket.tgt.primary.max-time-to-live-in-seconds=301
cas.ticket.tgt.primary.time-to-kill-in-seconds=120
# hard-timeout takes precedence over primary
# cas.ticket.tgt.hard-timeout.time-to-kill-in-seconds=120

# Remember Me
cas.ticket.tgt.rememberMe.enabled=false
# cas.ticket.tgt.rememberMe.timeToKillInSeconds=300

Ray

On Thu, 2022-01-06 at 01:19 -0800, vallee.romain wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

jm

unread,
Jan 6, 2022, 11:06:57 PM1/6/22
to CAS Community, vallee.romain
I think that tickets expiration policy decision making process veries in different CAS versions. You may
check the CAS code repository of the version you are using for a accurate answer.

Here are some links you may want to see:

Those links are about CAS 5.3 version, you may want to check your version of code by selecting a git tag.
If by any chance you are use CAS 5.3.x, this config may help you (may not be correct, test it yourself before use):
cas.ticket.tgt.maxTimeToLiveInSeconds=-1
cas.ticket.tgt.timeToKillInSeconds=86400
cas.ticket.tgt.rememberMe.enabled=true
cas.ticket.tgt.rememberMe.timeToKillInSeconds=1814400

vallee.romain

unread,
Jan 12, 2022, 5:33:09 AM1/12/22
to CAS Community, jm, vallee.romain
Hi !!!
thank you JM and Ray for your answers .

"expiration policy decision making process veries in different CAS versions"

you right, so i try with 6.4.4.2 and remember me option  won't remember session::(

vallee.romain

unread,
Jan 12, 2022, 6:25:51 AM1/12/22
to CAS Community, vallee.romain, jm
May be i found something !!


cas.tgc.same-site-policy=None 

i write this line into cas.properties, and rememberMe seems to work  !

now i gonna to try to understand this variable

Reply all
Reply to author
Forward
0 new messages