mediawiki-extensions-OATHAuth/ServiceWiring.php
Taavi Väänänen 94782641cf
Convert to a virtual domain
Bug: T348484
Change-Id: I1ab23dfdf32e6965cac4e6c5736abbbf606c1c92
2023-12-06 07:08:10 -08:00

27 lines
793 B
PHP

<?php
use MediaWiki\Extension\OATHAuth\OATHAuthModuleRegistry;
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
return [
'OATHAuthModuleRegistry' => static function ( MediaWikiServices $services ) {
return new OATHAuthModuleRegistry(
$services->getDBLoadBalancerFactory(),
ExtensionRegistry::getInstance()->getAttribute( 'OATHAuthModules' ),
);
},
'OATHUserRepository' => static function ( MediaWikiServices $services ) {
return new OATHUserRepository(
$services->getDBLoadBalancerFactory(),
new HashBagOStuff( [
'maxKey' => 5
] ),
$services->getService( 'OATHAuthModuleRegistry' ),
$services->getCentralIdLookupFactory(),
LoggerFactory::getInstance( 'authentication' )
);
}
];