mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-24 00:05:24 +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 Exception;
|
||||||
use jakobo\HOTP\HOTP;
|
use jakobo\HOTP\HOTP;
|
||||||
use MediaWiki\Extension\OATHAuth\IAuthKey;
|
use MediaWiki\Extension\OATHAuth\IAuthKey;
|
||||||
|
use MediaWiki\Extension\OATHAuth\OATHAuthServices;
|
||||||
use MediaWiki\Extension\OATHAuth\OATHUser;
|
use MediaWiki\Extension\OATHAuth\OATHUser;
|
||||||
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
|
|
||||||
use MediaWiki\Logger\LoggerFactory;
|
use MediaWiki\Logger\LoggerFactory;
|
||||||
use MediaWiki\MediaWikiServices;
|
use MediaWiki\MediaWikiServices;
|
||||||
use MWException;
|
use MWException;
|
||||||
|
@ -189,11 +189,7 @@ class TOTPKey implements IAuthKey {
|
||||||
'clientip' => $clientIP,
|
'clientip' => $clientIP,
|
||||||
] );
|
] );
|
||||||
|
|
||||||
$moduleRegistry = MediaWikiServices::getInstance()->getService( 'OATHAuthModuleRegistry' );
|
$userRepo = OATHAuthServices::getInstance()->getUserRepository();
|
||||||
$module = $moduleRegistry->getModuleByKey( 'totp' );
|
|
||||||
|
|
||||||
/** @var OATHUserRepository $userRepo */
|
|
||||||
$userRepo = MediaWikiServices::getInstance()->getService( 'OATHUserRepository' );
|
|
||||||
// TODO: support for multiple keys
|
// TODO: support for multiple keys
|
||||||
$user->setKeys( [ $this ] );
|
$user->setKeys( [ $this ] );
|
||||||
$userRepo->persist( $user, $clientIP );
|
$userRepo->persist( $user, $clientIP );
|
||||||
|
|
Loading…
Reference in a new issue