final int status = data.getStatus();
if ( (status == UserDataConstants.STATUS_NEW) || (status == UserDataConstants.STATUS_FAILED) || (status == UserDataConstants.STATUS_INPROCESS) || (status == UserDataConstants.STATUS_KEYRECOVERY)) {
if (log.isDebugEnabled()) {
log.debug("Trying to authenticate user: username="+username+", dn="+data.getSubjectDN()+", email="+data.getSubjectEmail()+", status="+status+", type="+data.getType());
}
if (!data.comparePassword(password)) {
final String msg = intres.getLocalizedMessage("authentication.invalidpwd", username);
logSession.log(admin, data.getCaId(), LogConstants.MODULE_CA, new Date(),username, null, LogConstants.EVENT_ERROR_USERAUTHENTICATION,msg);
throw new AuthLoginException(msg);
}
// Resets the remaining login attempts as this was a successful login