Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/revoker/PhabricatorAuthConduitTokenRevoker.php
<?php | <?php | ||||
final class PhabricatorAuthConduitTokenRevoker | final class PhabricatorAuthConduitTokenRevoker | ||||
extends PhabricatorAuthRevoker { | extends PhabricatorAuthRevoker { | ||||
const REVOKERKEY = 'conduit'; | const REVOKERKEY = 'conduit'; | ||||
public function getRevokerName() { | |||||
return pht('Conduit API Tokens'); | |||||
} | |||||
public function getRevokerDescription() { | |||||
return pht( | |||||
"Revokes all Conduit API tokens used to access the API.\n\n". | |||||
"Users will need to use `arc install-certificate` to install new ". | |||||
"API tokens before `arc` commands will work. Bots and scripts which ". | |||||
"access the API will need to have new tokens generated and ". | |||||
"installed."); | |||||
} | |||||
public function revokeAllCredentials() { | public function revokeAllCredentials() { | ||||
$table = id(new PhabricatorConduitToken()); | $table = id(new PhabricatorConduitToken()); | ||||
$conn = $table->establishConnection('w'); | $conn = $table->establishConnection('w'); | ||||
queryfx( | queryfx( | ||||
$conn, | $conn, | ||||
'DELETE FROM %T', | 'DELETE FROM %T', | ||||
$table->getTableName()); | $table->getTableName()); | ||||
Show All 18 Lines |