Page MenuHomePhorge

PhabricatorAuthConduitTokenRevoker.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhabricatorAuthConduitTokenRevoker.php

<?php
final class PhabricatorAuthConduitTokenRevoker
extends PhabricatorAuthRevoker {
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() {
$table = id(new PhabricatorConduitToken());
$conn = $table->establishConnection('w');
queryfx(
$conn,
'DELETE FROM %T',
$table->getTableName());
return $conn->getAffectedRows();
}
public function revokeCredentialsFrom($object) {
$table = id(new PhabricatorConduitToken());
$conn = $table->establishConnection('w');
queryfx(
$conn,
'DELETE FROM %T WHERE objectPHID = %s',
$table->getTableName(),
$object->getPHID());
return $conn->getAffectedRows();
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 1:50 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121896
Default Alt Text
PhabricatorAuthConduitTokenRevoker.php (1 KB)

Event Timeline