Merge pull request #698 from mposolda/master

Prefill login form just if rememberMe enabled for the realm
This commit is contained in:
Marek Posolda 2014-09-17 08:59:00 +02:00
commit 16ea18370d

View file

@ -964,9 +964,11 @@ public class TokenService {
LoginFormsProvider forms = Flows.forms(session, realm, client, uriInfo);
String rememberMeUsername = null;
Cookie rememberMeCookie = headers.getCookies().get(AuthenticationManager.KEYCLOAK_REMEMBER_ME);
if (rememberMeCookie != null && !"".equals(rememberMeCookie.getValue())) {
rememberMeUsername = rememberMeCookie.getValue();
if (realm.isRememberMe()) {
Cookie rememberMeCookie = headers.getCookies().get(AuthenticationManager.KEYCLOAK_REMEMBER_ME);
if (rememberMeCookie != null && !"".equals(rememberMeCookie.getValue())) {
rememberMeUsername = rememberMeCookie.getValue();
}
}
if (loginHint != null || rememberMeUsername != null) {