/** * Auth helper. * * @param authUser the auth user * @return the user * @throws Exception the exception */ private User authHelper(User authUser) throws Exception { if (authUser == null) return null; // check if authenticated user matches one of our users UserList userList = getUsers(); User userFound = null; for (User user : userList.getObjects()) { if (user.getUserName().equals(authUser.getUserName())) { userFound = user; break; } } // if user was found, update to match settings if (userFound != null) { Logger.getLogger(getClass()).info("Update user = "******"Add user = "******"User = " + authUser.getUserName()); authUser.setAuthToken(token); return authUser; }