3 final class PhabricatorAuthTemporaryTokenRevoker
4 extends PhabricatorAuthRevoker
{
6 const REVOKERKEY
= 'temporary';
8 public function getRevokerName() {
9 return pht('Temporary Tokens');
12 public function getRevokerDescription() {
14 "Revokes temporary authentication tokens.\n\n".
15 "Temporary tokens are used in password reset mail, welcome mail, and ".
16 "by some other systems like Git LFS. Revoking temporary tokens will ".
17 "invalidate existing links in password reset and invite mail that ".
18 "was sent before the revocation occurred.");
21 public function revokeAllCredentials() {
22 $table = new PhabricatorAuthTemporaryToken();
23 $conn = $table->establishConnection('w');
28 $table->getTableName());
30 return $conn->getAffectedRows();
33 public function revokeCredentialsFrom($object) {
34 $table = new PhabricatorAuthTemporaryToken();
35 $conn = $table->establishConnection('w');
39 'DELETE FROM %T WHERE tokenResource = %s',
40 $table->getTableName(),
43 return $conn->getAffectedRows();