Changeset View
Changeset View
Standalone View
Standalone View
src/conduit/ConduitClient.php
Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | public function callMethod($method, array $params) { | ||||
} | } | ||||
if ($this->username !== null) { | if ($this->username !== null) { | ||||
$core_future->setHTTPBasicAuthCredentials( | $core_future->setHTTPBasicAuthCredentials( | ||||
$this->username, | $this->username, | ||||
$this->password); | $this->password); | ||||
} | } | ||||
return id(new ConduitFuture($core_future)) | return (new ConduitFuture($core_future)) | ||||
->setClient($this, $method); | ->setClient($this, $method); | ||||
} | } | ||||
public function setBasicAuthCredentials($username, $password) { | public function setBasicAuthCredentials($username, $password) { | ||||
$this->username = $username; | $this->username = $username; | ||||
$this->password = new PhutilOpaqueEnvelope($password); | $this->password = new PhutilOpaqueEnvelope($password); | ||||
return $this; | return $this; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0