Skip to content

Instantly share code, notes, and snippets.

@HoffmannP
Last active October 13, 2017 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HoffmannP/de0a6073fc7120995eb4bf84605372d2 to your computer and use it in GitHub Desktop.
Save HoffmannP/de0a6073fc7120995eb4bf84605372d2 to your computer and use it in GitHub Desktop.
<?php
/* This pluing allows you to login via URZ-LDAP-authentication
{
//...
"AuthManagerAutoConfig": {
"primaryauth": {
"UrzLdap": {
"class": "UrzLdapPrimaryAuthenticationProvider",
"args": [
'authoritative' => true
]
}
}
},
//...
}
*/
use MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider;
class UrzLdapPrimaryAuthenticationProvider extends AbstractPasswordPrimaryAuthenticationProvider {
}
/**
* Authentifizierung eines Users durch ads.uni-jena.de, liefert Gruppen zurück
*
* @param string $ldap_user Zu autenthifizierender User (RZ-Kürzel)
* @param string $ldap_pw Zu testendes Passwort
*
* @return string|array Array der Gruppen, zu denen User gehört oder String mit Fehlermeldung
*/
function CMS_TPAuth_URZ( $ldap_user, $ldap_pw )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment