Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F548459
PhabricatorAuthTemporaryTokenRevoker.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
PhabricatorAuthTemporaryTokenRevoker.php
View Options
<?php
final
class
PhabricatorAuthTemporaryTokenRevoker
extends
PhabricatorAuthRevoker
{
const
REVOKERKEY
=
'temporary'
;
public
function
getRevokerName
()
{
return
pht
(
'Temporary Tokens'
);
}
public
function
getRevokerDescription
()
{
return
pht
(
"Revokes temporary authentication tokens.
\n\n
"
.
"Temporary tokens are used in password reset mail, welcome mail, and "
.
"by some other systems like Git LFS. Revoking temporary tokens will "
.
"invalidate existing links in password reset and invite mail that "
.
"was sent before the revocation occurred."
);
}
public
function
revokeAllCredentials
()
{
$table
=
new
PhabricatorAuthTemporaryToken
();
$conn
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn
,
'DELETE FROM %T'
,
$table
->
getTableName
());
return
$conn
->
getAffectedRows
();
}
public
function
revokeCredentialsFrom
(
$object
)
{
$table
=
new
PhabricatorAuthTemporaryToken
();
$conn
=
$table
->
establishConnection
(
'w'
);
queryfx
(
$conn
,
'DELETE FROM %T WHERE tokenResource = %s'
,
$table
->
getTableName
(),
$object
->
getPHID
());
return
$conn
->
getAffectedRows
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:49 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
121868
Default Alt Text
PhabricatorAuthTemporaryTokenRevoker.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment