/** * @param HttpCredentials|null $credentials * * @return $this */ public function setHttpCredentials(HttpCredentials $credentials = null) { if ($credentials === null) { $this->httpCredentials->clear(); } else { $this->httpCredentials->fillWith($credentials); } return $this; }
/** * @return HttpCredentials */ public function getHttpCredentials() { $credentials = new HttpCredentials(); if ($this->hasHttpCredentials()) { $credentials->set($this->httpUsername, $this->httpPassword); } return $credentials; }
/** * @return string[]|null */ public function getAuthData() { return $this->httpCredentials && $this->httpCredentials->present() ? [$this->httpCredentials->getUsername(), $this->httpCredentials->getPassword()] : null; }