code: public function setIdentity($host, $realm, $username, $password)
      {
          $this->authenticator->setIdentityForRealm($host, $realm, $username, $password);
      }
docs: Sets the identity for the current realm.
  
  @param string $host        Host to which realm applies.
  @param string $realm       Full name of realm.
  @param string $username    Username for realm.
  @param string $password    Password for realm.