Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F548511
PhabricatorAuthConduitTokenRevoker.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorAuthConduitTokenRevoker.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment