docs: public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
  
          final ModelNode userMap = this.userDomain;
  
          List<Callback> toRespondTo = new LinkedList<Callback>();
  
          String userName = null;
          ModelNode user = null;
          ExceptionSupplier<CredentialSource, Exception> userCredentialSourceSupplier = null;
  
          // A single pass may be sufficient but by using a two pass approach the Callbackhandler will not
          // fail if an unexpected order is encountered.
  
          // First Pass - is to double check no unsupported callbacks and to retrieve
          // information from the callbacks passing in information.
          for (Callback current : callbacks) {
  
              if (current instanceof AuthorizeCallback) {
                  toRespondTo.add(current);
              } else if (current instanceof NameCallback) {
                  NameCallback nameCallback = (NameCallback) current;
                  userName = nameCallback.getDefaultName();
                  if (userMap.get(USER).hasDefined(userName)) {
                      user = userMap.get(USER, userName);
                  }
                  userCredentialSourceSupplier = getUserCredentialSourceSupplier(userName);
              } else if (current instanceof PasswordCallback) {
                  toRespondTo.add(current);
              } else if (current instanceof RealmCallback) {
                  String realm = ((RealmCallback) current).getDefaultText();
                  if (this.realm.equals(realm) == false) {
                      // TODO - Check if this needs a real error or of just an unexpected internal error.
                      throw DomainManagementLogger.ROOT_LOGGER.invalidRealm(realm, this.realm);
                  }
              } else {
                  throw new UnsupportedCallbackException(current);
              }
          }
  
          // Second Pass - Now iterate the Callback(s) requiring a response.
          for (Callback current : toRespondTo) {
              if (current instanceof AuthorizeCallback) {
                  AuthorizeCallback acb = (AuthorizeCallback) current;
                  boolean authorized = acb.getAuthenticationID().equals(acb.getAuthorizationID());
                  if (authorized == false) {
                      SECURITY_LOGGER.tracef(
                              "Checking 'AuthorizeCallback', authorized=false, authenticationID=%s, authorizationID=%s.",
                              acb.getAuthenticationID(), acb.getAuthorizationID());
                  }
                  acb.setAuthorized(authorized);
              } else if (current instanceof PasswordCallback) {
                  if (user == null) {
                      SECURITY_LOGGER.tracef("User '%s' not found.", userName);
                      throw new UserNotFoundException(userName);
                  }
                  char[] password =EMPTY_PASSWORD;
                  if (user.hasDefined(PASSWORD)) {
                      password = user.require(PASSWORD).asString().toCharArray();
                  }
                  ((PasswordCallback) current).setPassword(resolvePassword(userCredentialSourceSupplier, password));
              }
  
          }
      }