Differential D18910 Diff 45370 src/applications/auth/revoker/PhabricatorAuthTemporaryTokenRevoker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/revoker/PhabricatorAuthTemporaryTokenRevoker.php
<?php | <?php | ||||
final class PhabricatorAuthTemporaryTokenRevoker | final class PhabricatorAuthTemporaryTokenRevoker | ||||
extends PhabricatorAuthRevoker { | extends PhabricatorAuthRevoker { | ||||
const REVOKERKEY = 'temporary'; | 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() { | public function revokeAllCredentials() { | ||||
$table = new PhabricatorAuthTemporaryToken(); | $table = new PhabricatorAuthTemporaryToken(); | ||||
$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 |