mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-30 19:14:31 +00:00
c54975b884
composer: * mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0 * php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0 npm: * grunt: 1.3.0 → 1.4.0 * lodash: 4.17.19 → 4.17.21 * https://npmjs.com/advisories/1673 (CVE-2021-23337) * hosted-git-info: 3.0.7 → 3.0.8 * https://npmjs.com/advisories/1677 (CVE-2021-23362) * postcss: 7.0.35 → 8.2.15 * https://npmjs.com/advisories/1693 (CVE-2021-23368) Change-Id: I0ad0eba98f23846f5baa3a10433331356229fca8
26 lines
647 B
PHP
26 lines
647 B
PHP
<?php
|
|
|
|
use MediaWiki\Extension\OATHAuth\OATHAuth;
|
|
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
return [
|
|
'OATHAuth' => static function ( MediaWikiServices $services ) {
|
|
return new OATHAuth(
|
|
$services->getMainConfig(),
|
|
$services->getDBLoadBalancerFactory()
|
|
);
|
|
},
|
|
'OATHUserRepository' => static function ( MediaWikiServices $services ) {
|
|
global $wgOATHAuthDatabase;
|
|
$auth = $services->getService( 'OATHAuth' );
|
|
return new OATHUserRepository(
|
|
$services->getDBLoadBalancerFactory()->getMainLB( $wgOATHAuthDatabase ),
|
|
new \HashBagOStuff( [
|
|
'maxKey' => 5
|
|
] ),
|
|
$auth
|
|
);
|
|
}
|
|
];
|