mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-24 16:25:23 +00:00
b9f768e20a
Bug: T218210 Change-Id: I079e6e819c079b68bbfecdac0d873b26d4e16e86
26 lines
634 B
PHP
26 lines
634 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
|
|
);
|
|
}
|
|
];
|