Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
SpecialRemoveCredentials | |
0.00% |
0 / 4 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getDefaultAction | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getRequestBlacklist | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Specials; |
4 | |
5 | use MediaWiki\Auth\AuthManager; |
6 | use MediaWiki\MainConfigNames; |
7 | |
8 | /** |
9 | * Special change to remove credentials (such as a two-factor token). |
10 | */ |
11 | class SpecialRemoveCredentials extends SpecialChangeCredentials { |
12 | protected static $allowedActions = [ AuthManager::ACTION_REMOVE ]; |
13 | |
14 | protected static $messagePrefix = 'removecredentials'; |
15 | |
16 | protected static $loadUserData = false; |
17 | |
18 | /** |
19 | * @param AuthManager $authManager |
20 | */ |
21 | public function __construct( AuthManager $authManager ) { |
22 | parent::__construct( $authManager ); |
23 | $this->mName = 'RemoveCredentials'; |
24 | } |
25 | |
26 | protected function getDefaultAction( $subPage ) { |
27 | return AuthManager::ACTION_REMOVE; |
28 | } |
29 | |
30 | protected function getRequestBlacklist() { |
31 | return $this->getConfig()->get( MainConfigNames::RemoveCredentialsBlacklist ); |
32 | } |
33 | } |
34 | |
35 | /** |
36 | * Retain the old class name for backwards compatibility. |
37 | * @deprecated since 1.41 |
38 | */ |
39 | class_alias( SpecialRemoveCredentials::class, 'SpecialRemoveCredentials' ); |