/** Sets the user key */ public AuthenticationService setUserKey(String user, byte[] key) { UserAuthInfo ur = getUserAuthInfo(user); if (ur != null) { ur.setKey(key); changed = true; } return this; }
/** * Gets the String value of this Object. * * @return the String value */ public String toString() { String str = ""; for (Enumeration e = getUserAuthInfos(); e.hasMoreElements(); ) { UserAuthInfo ur = (UserAuthInfo) e.nextElement(); str += ur.toString(); // str+="\r\n"; } return str; }
/** Adds a user record in the database */ private void addUserAuthInfo(UserAuthInfo ur) { if (hasUser(ur.getName())) removeUser(ur.getName()); users.put(ur.getName(), ur); }