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 | use MediaWiki\Session\SessionManager; |
| 8 | |
| 9 | /** |
| 10 | * Special change to remove credentials (such as a two-factor token). |
| 11 | * |
| 12 | * @ingroup SpecialPage |
| 13 | */ |
| 14 | class SpecialRemoveCredentials extends SpecialChangeCredentials { |
| 15 | /** @inheritDoc */ |
| 16 | protected static $allowedActions = [ AuthManager::ACTION_REMOVE ]; |
| 17 | |
| 18 | /** @inheritDoc */ |
| 19 | protected static $messagePrefix = 'removecredentials'; |
| 20 | |
| 21 | /** @inheritDoc */ |
| 22 | protected static $loadUserData = false; |
| 23 | |
| 24 | public function __construct( AuthManager $authManager, SessionManager $sessionManager ) { |
| 25 | parent::__construct( $authManager, $sessionManager ); |
| 26 | $this->mName = 'RemoveCredentials'; |
| 27 | } |
| 28 | |
| 29 | /** @inheritDoc */ |
| 30 | protected function getDefaultAction( $subPage ) { |
| 31 | return AuthManager::ACTION_REMOVE; |
| 32 | } |
| 33 | |
| 34 | /** @inheritDoc */ |
| 35 | protected function getRequestBlacklist() { |
| 36 | return $this->getConfig()->get( MainConfigNames::RemoveCredentialsBlacklist ); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * Retain the old class name for backwards compatibility. |
| 42 | * @deprecated since 1.41 |
| 43 | */ |
| 44 | class_alias( SpecialRemoveCredentials::class, 'SpecialRemoveCredentials' ); |