mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-24 00:05:24 +00:00
30fa5efcaf
Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I3b0d2a2a25d4c4c9d11906961634eac1d47afa80
29 lines
924 B
PHP
29 lines
924 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\OATHAuth\OATHAuthModuleRegistry;
|
|
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
|
|
use MediaWiki\Logger\LoggerFactory;
|
|
use MediaWiki\MediaWikiServices;
|
|
use MediaWiki\Registration\ExtensionRegistry;
|
|
use Wikimedia\ObjectCache\HashBagOStuff;
|
|
|
|
return [
|
|
'OATHAuthModuleRegistry' => static function ( MediaWikiServices $services ): OATHAuthModuleRegistry {
|
|
return new OATHAuthModuleRegistry(
|
|
$services->getDBLoadBalancerFactory(),
|
|
ExtensionRegistry::getInstance()->getAttribute( 'OATHAuthModules' ),
|
|
);
|
|
},
|
|
'OATHUserRepository' => static function ( MediaWikiServices $services ): OATHUserRepository {
|
|
return new OATHUserRepository(
|
|
$services->getDBLoadBalancerFactory(),
|
|
new HashBagOStuff( [
|
|
'maxKey' => 5
|
|
] ),
|
|
$services->getService( 'OATHAuthModuleRegistry' ),
|
|
$services->getCentralIdLookupFactory(),
|
|
LoggerFactory::getInstance( 'authentication' )
|
|
);
|
|
}
|
|
];
|