I am trying to use the ldap stack to authenticate versus a windows AD, I am on the setup phase, so there's probably something mistaken on my part, I am receiving a message saying Could not authenticate credentials against domain "LDAP"
Looking in the code I see two different cases for this message (LDAPAuthentication2/src/PluggableAuth.php) :
if ( !$ldapClient->canBindAs( $username, $password ) ) { $errorMessage = wfMessage( 'ldapauthentication2-error-authentication-failed', $domain )->text(); return false; } try { $result = $ldapClient->getUserInfo( $username ); $username = $result[$ldapClient->getConfig( ClientConfig::USERINFO_USERNAME_ATTR )]; $realname = $result[$ldapClient->getConfig( ClientConfig::USERINFO_REALNAME_ATTR )]; // maybe there are no emails stored in LDAP, this prevents php notices: $email = $result[$ldapClient->getConfig( ClientConfig::USERINFO_EMAIL_ATTR )] ?? ''; } catch ( Exception $ex ) { $errorMessage = wfMessage( 'ldapauthentication2-error-authentication-failed-userinfo', $domain )->text(); return false; }
The first case seems to be when there is a problem binding the ldap user for the checks, the second I have no idea, is there any way to see the full log so I can get a bit more insight?
This issue is about the package ldapauthentication2 (link) but there's no specific tag on it, please relocate it if there's a better place