Manual:$wgCentralIdLookupProviders/zh

Category:MediaWiki configuration settings/zh#CentralIdLookupProvidersCategory:MediaWiki configuration settings introduced in version 1.27.0/zh#CentralIdLookupProvidersCategory:MediaWiki configuration settings still in use/zh#CentralIdLookupProvidersCategory:Authentication variables/zh#CentralIdLookupProviders
认证: $wgCentralIdLookupProviders
注册中心ID查找提供者。
引进版本:1.27.0 (Gerrit change 254300; git #d032bb52)
移除版本:仍在使用
允许的值:(提供者ID的ObjectFactory 规格字符串)
(see below)

详情

Used to define what classes implement MediaWiki\User\CentralId\CentralIdLookup for various look up services.

Key is the provider ID, value is a specification for ObjectFactory.

Default values

MediaWiki版本:
1.42
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
			'HideUserUtils',
		]
	],
];
MediaWiki版本:
1.41
Gerrit change 925722
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
		]
	],
];
MediaWiki版本:
1.37 1.40
Gerrit change 700991
$wgCentralIdLookupProviders = [
	'local' => [
		'class' => LocalIdLookup::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancer',
		]
	],
];
MediaWiki版本:
1.31 1.36
$wgCentralIdLookupProviders = [
	'local' => [ 'class' => LocalIdLookup::class ],
];
MediaWiki版本:
1.27 1.30
$wgCentralIdLookupProviders = [
	'local' => [ 'class' => 'LocalIdLookup' ],
];

$wgCentralIdLookupProviders['mycustom'] = [
    'class' => 'MyCustomCentralIdLookup',
    'args' => [ 'arg1', 'arg2' ],
];

or, if the extension uses extension registration (preferable):

{
    //...
    "CentralIdLookupProviders": {
        "mycustom": {
            "class": "MyCustomCentralIdLookup",
            "args": [ "arg1", "arg2" ]
    },
    //...
}

This will create an object with new MyCustomCentralIdLookup( 'arg1', 'arg2' ), and register it as a central ID lookup service.

参见

Category:Authentication variables/zh Category:MediaWiki configuration settings/zh Category:MediaWiki configuration settings introduced in version 1.27.0/zh Category:MediaWiki configuration settings still in use/zh