if ($force_conduit_version) {
$workflow->forceConduitVersion($force_conduit_version);
}
- if ($force_token) {
- $workflow->forceConduitToken($force_token);
- }
if ($conduit_timeout) {
$workflow->setConduitTimeout($conduit_timeout);
}
$user_name = idx($host_config, 'user');
$certificate = idx($host_config, 'cert');
$conduit_token = idx($host_config, 'token');
+ if ($force_token) {
+ $conduit_token = $force_token;
+ }
$description = implode(' ', $original_argv);
$credentials = array(
private $conduitCredentials;
private $conduitAuthenticated;
private $forcedConduitVersion;
- private $forcedConduitToken;
private $conduitTimeout;
private $userPHID;
}
- /**
- * Force use of a specific API token.
- *
- * Controlled by the --conduit-token flag.
- *
- * @param string API token to use.
- * @return this
- * @task conduit
- */
- final public function forceConduitToken($token) {
- $this->forcedConduitToken = $token;
- return $this;
- }
-
-
/**
* Get the protocol version the client should identify with.
*
// If we have `token`, this server supports the simpler, new-style
// token-based authentication. Use that instead of all the certificate
// stuff.
- $token = null;
- if (isset($credentials['token'])) {
- $token = $credentials['token'];
- }
- if ($this->forcedConduitToken) {
- $token = $this->forcedConduitToken;
- }
+ $token = idx($credentials, 'token');
if (strlen($token)) {
$conduit = $this->getConduit();