]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/kernel/RealmLoginModule.java
Salome HOME
Refactoring continues: UserService is created instead of UserDirectory. Database...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / kernel / RealmLoginModule.java
index a0234f4973e15850e7b7338a88dbf401f79b5d63..6269ae31167a8f79923eca8828d6787ba925deb3 100644 (file)
@@ -16,7 +16,7 @@ import javax.security.auth.spi.*;
 
 import org.apache.log4j.Logger;
 import org.splat.dal.bo.kernel.User;
-import org.splat.dal.dao.kernel.Database;
+import org.splat.service.ServiceLocatorImpl;
 
 
 public class RealmLoginModule implements LoginModule {
@@ -47,7 +47,7 @@ public class RealmLoginModule implements LoginModule {
 //       sharedState     = state;
 //       options         = opts;
 //    debug           = "true".equalsIgnoreCase((String)options.get("debug"));
-         logger          = Logger.getLogger(Database.class);
+         logger          = Logger.getLogger(RealmLoginModule.class);
     }
 
 //  ==============================================================================================================================
@@ -73,18 +73,18 @@ public class RealmLoginModule implements LoginModule {
            }
            
 //    Authentication       
-           User found = UserDirectory.selectUser(username, password);
+           User found = ServiceLocatorImpl.getInstance().getUserService().selectUser(username, password);
            if (found != null) {
              identity  = found;
              succeeded = true;       
              Calendar today  = java.util.Calendar.getInstance();
              Date     datime = today.getTime();
-             logger.info("RKV:Connection of " + identity.toString() + " " + datime.toString() + ".");
+             logger.info("Connection of " + identity.toString() + " " + datime.toString() + ".");
              return true;
            } else {
              identity  = null;
                  succeeded = false;              
-                 found     = UserDirectory.selectUser(username);
+                 found     = ServiceLocatorImpl.getInstance().getUserService().selectUser(username);
           String             reason = "password";
                  if (found == null) reason = "username";
              logger.info("Connection attempt as " + username + ".");