Page MenuHomePhabricator
Authored By
amckinley
Apr 11 2018, 7:04 PM
Size
895 B
Referenced Files
None
Subscribers
None
/**
* @phutil-external-symbol class PhabricatorEnv
**/
protected function newConduitClient() {
$key_path = $this->getPath('conf/keystore/client.key');
$pub_path = $this->getPath('conf/keystore/client.pub');
$private_key = Filesystem::readFile($key_path);
$private_key = new PhutilOpaqueEnvelope($private_key);
$public_key = Filesystem::readFile($pub_path);
if ($this->getHostAttribute('role') == 'local') {
// Modify the configured base URI so that we respect the port and
// protocol if they're set up in an unusual way.
$admin_uri = PhabricatorEnv::getEnvConfig('phabricator.base-uri');
$admin_uri = new PhutilURI($base_uri);
$admin_uri = (string)$base_uri;
} else {
$admin_uri = 'https://admin.phacility.com/';
}
return id(new ConduitClient($admin_uri))
->setSigningKeys($public_key, $private_key);
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
1001031
Default Alt Text
(895 B)

Event Timeline