logsession.log(admin, admin.getCAId(), LogEntry.MODULE_CA, new java.util.Date(),username, null, LogEntry.EVENT_INFO_USERAUTHENTICATION,"NULL-Authenticated user");
logsession.log(admin, admin.getCaId(), LogEntry.MODULE_CA, new java.util.Date(),username, null, LogEntry.EVENT_INFO_USERAUTHENTICATION,"NULL-Authenticated user");
    public UserAuthData authenticateUser(Admin admin, String username, String password)        throws ObjectNotFoundException, AuthStatusException, AuthLoginException {        debug(">authenticateUser(" + username + ", hiddenpwd)");        try {            // Does the username contain a DN?            String dn = CertTools.stringToBCDNString(username);            if ((dn != null) && (dn.length() > 0)) {                String email = CertTools.getEmailFromDN(dn);                try{                  logsession.log(admin, admin.getCAId(), LogEntry.MODULE_CA, new java.util.Date(),username, null, LogEntry.EVENT_INFO_USERAUTHENTICATION,"NULL-Authenticated user");                }catch(RemoteException re){                  throw new EJBException(re);                }                String altName = (email == null) ? null : ("rfc822Name=" + email);                // Use default certificate profile 0                UserAuthData ret = new UserAuthData(username, password, dn, admin.getCAId(),  altName, email, SecConst.USER_ENDUSER, SecConst.PROFILE_NO_PROFILE, null);                debug("<authenticateUser("+username+", hiddenpwd)");                return ret;            } else {                try{                  logsession.log(admin, admin.getCAId(), LogEntry.MODULE_CA, new java.util.Date(),username, null, LogEntry.EVENT_ERROR_USERAUTHENTICATION,"User does not contain a DN.");                }catch(RemoteException re){                  throw new EJBException(re);                }                throw new AuthLoginException("User " + username + " does not contain a DN.");            }        } catch (AuthLoginException le) {            throw le;        } catch (Exception e) {            throw new EJBException(e.toString());        }    }