Differential D15943 Diff 38385 src/applications/conduit/controller/PhabricatorConduitAPIController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/controller/PhabricatorConduitAPIController.php
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | if ($auth_type === ConduitClient::AUTH_ASYMMETRIC) { | ||||
} | } | ||||
// If the signature is valid, find the user or device which is | // If the signature is valid, find the user or device which is | ||||
// associated with this public key. | // associated with this public key. | ||||
$stored_key = id(new PhabricatorAuthSSHKeyQuery()) | $stored_key = id(new PhabricatorAuthSSHKeyQuery()) | ||||
->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
->withKeys(array($public_key)) | ->withKeys(array($public_key)) | ||||
->withIsActive(true) | |||||
->executeOne(); | ->executeOne(); | ||||
if (!$stored_key) { | if (!$stored_key) { | ||||
return array( | return array( | ||||
'ERR-INVALID-AUTH', | 'ERR-INVALID-AUTH', | ||||
pht('No user or device is associated with that public key.'), | pht('No user or device is associated with that public key.'), | ||||
); | ); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |