Manual:$wgCentralIdLookupProviders/zh
From Linux Web Expert
<translate> Authentication</translate>: $wgCentralIdLookupProviders | |
---|---|
注册中心ID查找提供者。 |
|
<translate> Introduced in version:</translate> | 1.27.0 (Gerrit change 254300; git #d032bb52) |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (提供者ID的ObjectFactory 规格字符串) |
<translate> Default value:</translate> | (see below) |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
详情
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
<translate> ≥</translate> 1.42
<translate> MediaWiki version:</translate> |
$wgCentralIdLookupProviders = [
'local' => [
'class' => LocalIdLookup::class,
'services' => [
'MainConfig',
'DBLoadBalancerFactory',
'HideUserUtils',
]
],
];
1.41
Gerrit change 925722<translate> MediaWiki version:</translate> |
$wgCentralIdLookupProviders = [
'local' => [
'class' => LocalIdLookup::class,
'services' => [
'MainConfig',
'DBLoadBalancerFactory',
]
],
];
1.37 – 1.40
Gerrit change 700991<translate> MediaWiki versions:</translate> |
$wgCentralIdLookupProviders = [
'local' => [
'class' => LocalIdLookup::class,
'services' => [
'MainConfig',
'DBLoadBalancer',
]
],
];
1.31 – 1.36
<translate> MediaWiki versions:</translate> |
$wgCentralIdLookupProviders = [
'local' => [ 'class' => LocalIdLookup::class ],
];
1.27 – 1.30
<translate> MediaWiki versions:</translate> |
$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.