Topic on Manual talk:Active Directory Integration

Why use a json file?

1
92.34.216.26 (talkcontribs)

$LDAPProviderDomainConfigProvider = function() {

        $config = [

                'DOMAIN' => [

                        'connection' => [

                                "server" => "AD-SERVER",

                                "port" => "3268",

                                "enctype" => "tls",

                                "user" => "CN=user,OU=stuff",

                                "pass" => "password123",

                                "options" => [

                                        "LDAP_OPT_DEREF" => 1,

                                        "LDAP_OPT_REFERRALS" => 0,

                                        "LDAP_OPT_X_TLS_CRLCHECK" => 0,

                                        "LDAP_OPT_X_TLS_REQUIRE_CERT" => 0

                                ],

                                "basedn" => "DC=DOMAIN,DC=TLD",

                                "groupbasedn" => "...",

                                "userbasedn" => "...",

                                "searchattribute" => "cn",

                                "usernameattribute" => "cn",

                                "realnameattribute" => "mail",

                                "emailattribute" => "mail",

                                "presearchusernamemodifiers" => [ "spacestounderscores", "lowercase" ]

                        ],

                        "userinfo" => [],

                        "authorization" => [],

                        "groupsync" => [

                                "mapping" => [

                                        "user" => "GROUP-ALL-USERS-ARE-IN"

                                ]

                        ]

                ]

        ];

        return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );

};


It will automatically be used by LDAPAuthentication2

Reply to "Why use a json file?"