]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.cms/src/org/argeo/cms/auth/UserAdminLoginModule.java
[maven-release-plugin] prepare release argeo-commons-2.1.70
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / auth / UserAdminLoginModule.java
index 1d91a21ca4802e861671bc9ec0afd3c75ee89b36..ebe81b6714c49feffbcdae26aceb4b901c6b8a61 100644 (file)
@@ -95,7 +95,7 @@ public class UserAdminLoginModule implements LoginModule {
                        if (locale == null)
                                locale = Locale.getDefault();
                        // FIXME add it to Subject
-                       // UiContext.setLocale(locale);
+//                     Locale.setDefault(locale);
 
                        username = nameCallback.getName();
                        if (username == null || username.trim().equals("")) {
@@ -117,8 +117,10 @@ public class UserAdminLoginModule implements LoginModule {
                        AuthenticatingUser authenticatingUser = new AuthenticatingUser(user.getName(), password);
                        bindAuthorization = userAdmin.getAuthorization(authenticatingUser);
                        // TODO check tokens as well
-                       if (bindAuthorization != null)
+                       if (bindAuthorization != null) {
+                               authenticatedUser = user;
                                return true;
+                       }
                } catch (Exception e) {
                        // silent
                        if(log.isTraceEnabled())