mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-23 15:56:59 +00:00
TOTPKey: Remove unused code
Change-Id: I2d171823dc4c7c88b32872a6c3521af05b10ef39
This commit is contained in:
parent
f0f728d342
commit
0f026d7999
|
@ -25,8 +25,8 @@ use EmptyBagOStuff;
|
|||
use Exception;
|
||||
use jakobo\HOTP\HOTP;
|
||||
use MediaWiki\Extension\OATHAuth\IAuthKey;
|
||||
use MediaWiki\Extension\OATHAuth\OATHAuthServices;
|
||||
use MediaWiki\Extension\OATHAuth\OATHUser;
|
||||
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
|
||||
use MediaWiki\Logger\LoggerFactory;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MWException;
|
||||
|
@ -189,11 +189,7 @@ class TOTPKey implements IAuthKey {
|
|||
'clientip' => $clientIP,
|
||||
] );
|
||||
|
||||
$moduleRegistry = MediaWikiServices::getInstance()->getService( 'OATHAuthModuleRegistry' );
|
||||
$module = $moduleRegistry->getModuleByKey( 'totp' );
|
||||
|
||||
/** @var OATHUserRepository $userRepo */
|
||||
$userRepo = MediaWikiServices::getInstance()->getService( 'OATHUserRepository' );
|
||||
$userRepo = OATHAuthServices::getInstance()->getUserRepository();
|
||||
// TODO: support for multiple keys
|
||||
$user->setKeys( [ $this ] );
|
||||
$userRepo->persist( $user, $clientIP );
|
||||
|
|
Loading…
Reference in a new issue