mediawiki/ldap-provider

Provides a mechanism for MediaWiki to retrieve information using the LDAP protocol

dev-master 2017-11-08 09:13 UTC

README

Table of Contents

Extension:LDAPProvider

This extension provides a common infratructure to connect to a LDAP resource and run queries against it.

Installation

This extension can be installed by creating a composer.local.json file in your MediaWiki's installation directory containing the following (or merging this into your current composer.local.json):

{
	"require": {
		"mediawiki/ldap-provider": "dev-master"
	},
	"config": {
		"prefer": "source"
	}
}

Note that "prefer": "source" causes composer to use a clone of the git repository if it can.

Configuration

In the simplest case where you have a single LDAP server to query, you need to simply specify your LDAP server and the ini file.

Out of the box, LDAPProvider points to the Forum Systems online ldap test server in the included ldapprovider.ini. This is a simple ini file that demonstrates the configuration:

[main]
	server=ldap.forumsys.com
	user='cn=read-only-admin,dc=example,dc=com'
	pass=password
	basedn='dc=example,dc=com'

Other configurations are possible.

Testing

Tests are provided. These can be run using the following in your MediaWiki's installation directory:

    $ ./tests/phpunit/phpunit.php extensions/LDAPProvider