Authenticator authenticator;
authenticator = (Authenticator) new com.dotcms.repackage.bsh.Interpreter().eval("new " + PRE_AUTHENTICATOR + "()");
if (useEmailAsLogin) {
authenticator.authenticateByEmailAddress(comp.getCompanyId(), username, passwd);
} else {
authenticator.authenticateByUserId(comp.getCompanyId(), username, passwd);
}
}
}catch (AuthException ae) {
Logger.debug(this, "Username : " + username + " failed to login", ae);
throw new DotSecurityException(ae.getMessage(),ae);