Differential D12380 Diff 29723 src/applications/auth/conduit/PhabricatorAuthQueryPublicKeysConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/conduit/PhabricatorAuthQueryPublicKeysConduitAPIMethod.php
<?php | <?php | ||||
final class PhabricatorAuthQueryPublicKeysConduitAPIMethod | final class PhabricatorAuthQueryPublicKeysConduitAPIMethod | ||||
extends PhabricatorAuthConduitAPIMethod { | extends PhabricatorAuthConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'auth.querypublickeys'; | return 'auth.querypublickeys'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return pht('Query public keys.'); | return pht('Query public keys.'); | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'ids' => 'optional list<id>', | 'ids' => 'optional list<id>', | ||||
'objectPHIDs' => 'optional list<phid>', | 'objectPHIDs' => 'optional list<phid>', | ||||
'keys' => 'optional list<string>', | 'keys' => 'optional list<string>', | ||||
) + self::getPagerParamTypes(); | ) + self::getPagerParamTypes(); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'result-set'; | return 'result-set'; | ||||
} | } | ||||
public function defineErrorTypes() { | |||||
return array(); | |||||
} | |||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
$query = id(new PhabricatorAuthSSHKeyQuery()) | $query = id(new PhabricatorAuthSSHKeyQuery()) | ||||
->setViewer($viewer); | ->setViewer($viewer); | ||||
$ids = $request->getValue('ids'); | $ids = $request->getValue('ids'); | ||||
if ($ids !== null) { | if ($ids !== null) { | ||||
Show All 40 Lines |