code: public function setIdentityForRealm($host, $realm, $username, $password)
      {
          if (isset($this->realms[$host][$realm])) {
              $this->realms[$host][$realm]->setIdentity($username, $password);
          }
      }
docs: Sets the current identity to be presented against that realm.
  
  @param string $host        Server hosting realm.
  @param string $realm       Name of realm.
  @param string $username    Username for realm.
  @param string $password    Password for realm.