mediawiki-extensions-OATHAuth/ServiceWiring.php
James D. Forrester 76b859e36c build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: Ie64f06dcec14b87a87db0ef03931196aeea41404
2019-10-11 10:58:52 -07:00

26 lines
633 B
PHP

<?php
use MediaWiki\MediaWikiServices;
use MediaWiki\Extension\OATHAuth\OATHAuth;
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
return [
'OATHAuth' => function ( MediaWikiServices $services ) {
return new OATHAuth(
$services->getMainConfig(),
$services->getDBLoadBalancerFactory()
);
},
'OATHUserRepository' => function ( MediaWikiServices $services ) {
global $wgOATHAuthDatabase;
$auth = $services->getService( 'OATHAuth' );
return new OATHUserRepository(
$services->getDBLoadBalancerFactory()->getMainLB( $wgOATHAuthDatabase ),
new \HashBagOStuff( [
'maxKey' => 5
] ),
$auth
);
}
];