2019-03-14 14:39:10 +00:00
|
|
|
<?php
|
|
|
|
|
2022-12-31 21:06:34 +00:00
|
|
|
use MediaWiki\Extension\OATHAuth\OATHAuthModuleRegistry;
|
2019-10-11 17:58:52 +00:00
|
|
|
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
|
2022-12-31 18:48:09 +00:00
|
|
|
use MediaWiki\Logger\LoggerFactory;
|
2020-01-14 08:27:29 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
2019-03-14 14:39:10 +00:00
|
|
|
|
|
|
|
return [
|
2022-12-31 21:06:34 +00:00
|
|
|
'OATHAuthModuleRegistry' => static function ( MediaWikiServices $services ) {
|
2022-12-31 23:49:18 +00:00
|
|
|
return new OATHAuthModuleRegistry(
|
2023-10-17 18:39:14 +00:00
|
|
|
$services->getDBLoadBalancerFactory(),
|
2022-12-31 23:49:18 +00:00
|
|
|
ExtensionRegistry::getInstance()->getAttribute( 'OATHAuthModules' ),
|
|
|
|
);
|
2019-03-14 14:39:10 +00:00
|
|
|
},
|
2021-05-12 03:37:42 +00:00
|
|
|
'OATHUserRepository' => static function ( MediaWikiServices $services ) {
|
2019-03-14 14:39:10 +00:00
|
|
|
return new OATHUserRepository(
|
2023-10-17 18:39:14 +00:00
|
|
|
$services->getDBLoadBalancerFactory(),
|
2022-12-31 18:48:09 +00:00
|
|
|
new HashBagOStuff( [
|
2019-03-14 14:39:10 +00:00
|
|
|
'maxKey' => 5
|
|
|
|
] ),
|
2022-12-31 21:06:34 +00:00
|
|
|
$services->getService( 'OATHAuthModuleRegistry' ),
|
2022-12-31 18:48:09 +00:00
|
|
|
$services->getCentralIdLookupFactory(),
|
|
|
|
LoggerFactory::getInstance( 'authentication' )
|
2019-03-14 14:39:10 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
];
|