mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-14 19:31:17 +00:00
5b1a07906a
The following sniffs are failing and were disabled: * MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate * MediaWiki.Commenting.FunctionComment.MissingParamName * MediaWiki.Commenting.FunctionComment.MissingParamTag * MediaWiki.Commenting.FunctionComment.MissingReturn Additional changes: * Also sorted "composer fix" command to run phpcbf last. Change-Id: Idb1b91244e653b2ba2e27bceb3eba769577124a9
26 lines
633 B
PHP
26 lines
633 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\OATHAuth\OATHAuth;
|
|
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
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
|
|
);
|
|
}
|
|
];
|