[keycloak-dev] Session Expiry & Remember Me

Alex Chatziparaskewas alex.chatziparaskewas at trapezegroup.com
Tue Jan 15 09:38:47 EST 2019


Many thanks!

From: Stefan Guilhen [mailto:sguilhen at redhat.com]
Sent: 15 January 2019 13:22
To: Alex Chatziparaskewas <alex.chatziparaskewas at trapezegroup.com>
Cc: keycloak-dev at lists.jboss.org
Subject: Re: [keycloak-dev] Session Expiry & Remember Me

Yes, you are absolutely right, that expression should be using the expiredRememberMe value in that spot. I'll work on the fix.

Best regards,
Stefan

On Tue, Jan 15, 2019 at 8:33 AM Alex Chatziparaskewas <alex.chatziparaskewas at trapezegroup.com<mailto:alex.chatziparaskewas at trapezegroup.com>> wrote:
Hi All,

I am trying to get the remember me functionality running having the problem that my sessions are expired by keycloak - in my eyes - prematurely. I started digging through keycloak code and stumbled over the following:

class UserSessionPredicate, method 'test':

        ...
        if (entity.isRememberMe()) {
            if (expiredRememberMe != null && expiredRefreshRememberMe != null && entity.getStarted() > ###expiredRefreshRememberMe### && entity.getLastSessionRefresh() > expiredRefreshRememberMe) {
                return false;
            }
        }
        else {
            if (expired != null && expiredRefresh != null && entity.getStarted() > expired && entity.getLastSessionRefresh() > expiredRefresh) {
                return false;
            }
        }
        ...

The marked (###) 'expiredRefreshRememberMe' in the second if statement, should that not be 'expiredRememberMe'?

Thanks & Regards,
Alex




_______________________________________________
keycloak-dev mailing list
keycloak-dev at lists.jboss.org<mailto:keycloak-dev at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-dev


--

STEFAN GUILHEN

PRINCIPAL SOFTWARE ENGINEER

Red Hat<https://www.redhat.com/>

sguilhen at redhat.com<mailto:sguilhen at redhat.com>    M: +55-11-98117-7332<tel:+55-11-98117-7332>
[https://www.redhat.com/files/brand/email/sig-redhat.png]<https://red.ht/sig>

@RedHat<https://twitter.com/redhat>   Red Hat<https://www.linkedin.com/company/red-hat>   Red Hat<https://www.facebook.com/RedHatInc>


More information about the keycloak-dev mailing list