From 89471b7db188e13a16d72a1a7ae5449b8fe7169d Mon Sep 17 00:00:00 2001 From: mposolda Date: Thu, 18 Sep 2014 11:03:44 +0200 Subject: [PATCH] KEYCLOAK-695 Let KEYCLOAK_REMEMBER_ME cookie to be valid for 1 year --- .../org/keycloak/services/managers/AuthenticationManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java index b99df154f1..ae0b20cb31 100755 --- a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java +++ b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java @@ -119,9 +119,9 @@ public class AuthenticationManager { public void createRememberMeCookie(RealmModel realm, String username, UriInfo uriInfo, ClientConnection connection) { String path = getIdentityCookiePath(realm, uriInfo); boolean secureOnly = realm.getSslRequired().isRequired(connection); - // remember me cookie should be persistent (hardcoded to 1 month for now) + // remember me cookie should be persistent (hardcoded to 365 days for now) //NewCookie cookie = new NewCookie(KEYCLOAK_REMEMBER_ME, "true", path, null, null, realm.getCentralLoginLifespan(), secureOnly);// todo httponly , true); - CookieHelper.addCookie(KEYCLOAK_REMEMBER_ME, username, path, null, null, 2592000, secureOnly, true); + CookieHelper.addCookie(KEYCLOAK_REMEMBER_ME, username, path, null, null, 31536000, secureOnly, true); } protected String encodeToken(RealmModel realm, Object token) {