3 final class PhabricatorAuthConduitTokenRevoker
4 extends PhabricatorAuthRevoker
{
6 const REVOKERKEY
= 'conduit';
8 public function getRevokerName() {
9 return pht('Conduit API Tokens');
12 public function getRevokerDescription() {
14 "Revokes all Conduit API tokens used to access the API.\n\n".
15 "Users will need to use `arc install-certificate` to install new ".
16 "API tokens before `arc` commands will work. Bots and scripts which ".
17 "access the API will need to have new tokens generated and ".
21 public function revokeAllCredentials() {
22 $table = id(new PhabricatorConduitToken());
23 $conn = $table->establishConnection('w');
28 $table->getTableName());
30 return $conn->getAffectedRows();
33 public function revokeCredentialsFrom($object) {
34 $table = id(new PhabricatorConduitToken());
35 $conn = $table->establishConnection('w');
39 'DELETE FROM %T WHERE objectPHID = %s',
40 $table->getTableName(),
43 return $conn->getAffectedRows();