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 {
// sharedState = state;
// options = opts;
// debug = "true".equalsIgnoreCase((String)options.get("debug"));
- logger = Logger.getLogger(Database.class);
+ logger = Logger.getLogger(RealmLoginModule.class);
}
// ==============================================================================================================================
}
// 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 + ".");