Skip to main content
100%

Gist de0a6073fc7120995eb4bf84605372d2

✓ Published0🌍 Public
HHoffmannP
Last edited Oct 13, 2017
Created on Oct 13, 2017

This example demonstrates a PHP-based LDAP authentication provider for MediaWiki, showing how a custom `UrzLdapPrimaryAuthenticationProvider` class extends `AbstractPasswordPrimaryAuthenticationProvider` to integrate with an external directory service. The code references `ads.uni-jena.de` as the LDAP server and includes a function `CMS_TPAuth_URZ` that accepts a username and password to authenticate users and return group memberships or an error string. It uses MediaWiki’s AuthManager configuration via `AuthManagerAutoConfig` with a `primaryauth` key, while the helper function employs LDAP methods for querying group data. The example highlights the structure for extending authentication without showing actual LDAP query implementation details.

AI-generated description

Similar vizzes