mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-13 18:16:56 +00:00
94782641cf
Bug: T348484 Change-Id: I1ab23dfdf32e6965cac4e6c5736abbbf606c1c92
27 lines
793 B
PHP
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' )
|
|
);
|
|
}
|
|
];
|