X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.security.ui.rap%2Fsrc%2Forg%2Fargeo%2Fsecurity%2Fui%2Frap%2FSecureEntryPoint.java;h=67e76ceae92c3be835fe54743da102b0ce605064;hb=0c5fb19fc8447577255071899e445329da8be5e7;hp=7f92ab7cb913965a54fff22fb17647164824f111;hpb=08e197f0f58e006f4baafaadcc30a029c0fa5ca6;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/SecureEntryPoint.java b/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/SecureEntryPoint.java index 7f92ab7cb..67e76ceae 100644 --- a/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/SecureEntryPoint.java +++ b/org.argeo.security.ui.rap/src/org/argeo/security/ui/rap/SecureEntryPoint.java @@ -86,18 +86,9 @@ public class SecureEntryPoint implements EntryPoint { SecurityContextHolder .setContext((SecurityContext) contextFromSessionObject); - // if (log.isDebugEnabled()) - // log.debug("THREAD=" + Thread.currentThread().getId() - // + ", sessionStore=" + RWT.getSessionStore().getId() - // + ", remote user=" + httpRequest.getRemoteUser()); - - // create display final Display display = PlatformUI.createDisplay(); Subject subject = new Subject(); - // log in - // Thread.currentThread().setContextClassLoader( - // getClass().getClassLoader()); final LoginContext loginContext; try { CallbackHandler callbackHandler = new DefaultLoginDialog( @@ -111,10 +102,6 @@ public class SecureEntryPoint implements EntryPoint { tryLogin: while (subject.getPrincipals(Authentication.class).size() == 0) { try { loginContext.login(); - // if () { - // throw new ArgeoException("Login failed"); - // } - if (subject.getPrincipals(Authentication.class).size() == 0) throw new ArgeoException("Login succeeded but no auth");// fatal @@ -122,12 +109,13 @@ public class SecureEntryPoint implements EntryPoint { if (httpSession.getAttribute(SPRING_SECURITY_CONTEXT_KEY) == null) httpSession.setAttribute(SPRING_SECURITY_CONTEXT_KEY, SecurityContextHolder.getContext()); + // add thread locale to RWT session if (log.isTraceEnabled()) log.trace("Locale " + LocaleUtils.threadLocale.get()); RWT.setLocale(LocaleUtils.threadLocale.get()); - // Once the user is logged in, longer session timeout + // once the user is logged in, longer session timeout RWT.getRequest().getSession() .setMaxInactiveInterval(sessionTimeout);