Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgSessionProviders and the translation is 40% complete.

Other languages:
English • ‎español • ‎magyar • ‎polski • ‎português • ‎日本語
Autenticación: $wgSessionProviders
Configuración de proveedor de la sesión.
Introducido en la versión:1.27.0 (Gerrit change 243223; git #a73c5b73)
Eliminado en la versión:aún se usa
Valores permitidos:(variedad de ObjectFactory especificaciones)
Valor predeterminado:véase abajo


Specifies what providers to use for SessionManager . By default, CookieSessionProvider (for normal cookie-based authentication) and BotPasswordSessionProvider (for bot passwords) are included.

Order and array keys are not relevant. By convention, the array key is the classname of the provider.


$wgSessionProviders['MyCustomSessionProvider'] = [
    'class' => 'MyCustomSessionProvider',
    'args' => [ 'arg1', 'arg2' ],

or better, in PHP 5.5 and newer:

$wgSessionProviders[MyCustomSessionProvider::class] = [
    'class' => MyCustomSessionProvider::class,
    'args' => [ 'arg1', 'arg2' ],

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

    "SessionProviders": {
        "MyCustomSessionProvider": {
            "class": "MyCustomSessionProvider",
            "args": [ "arg1", "arg2" ]

This will create a session provider object with new MyCustomSessionProvider( 'arg1', 'arg2' ), and register it as one of the session providers. See ObjectFactory for details of the object construction syntax.

Véase también