public AccessToken ValidateNewUser(string username, string newPassword) { // check for new user if (1 == UserAccessor.RetrieveUserByUsernameAndPassword(username, "NEWUSER")) { UserAccessor.CreatePasswordForUsername(username, "NEWUSER", newPassword.HashSha256()); } else { throw new ApplicationException("Data not found."); } return(ValidateExistingUser(username, newPassword)); }