I found that because the ldap_integration module (ldapauth) bypasses the Drupal authentication system to do its dirty work, httpauth wouldn't work with LDAP users.
Here's a patch that lets it work by calling ldapauth_login_validate. It's hackish and applied to httpauth rather than the source of the problem, but httpauth is much less complex and brittle.
// Allow authentication via LDAP
if (function_exists('ldapauth_login_validate')) {
require_once('includes/common.inc');
require_once('includes/unicode.inc');
require_once('modules/user/user.module');
require_once(drupal_get_path('module', 'ldapauth') .'/ldap_integration/LDAPInterface.php');
$form_state = array('values' => array('name' => $name, 'pass' => $pass));
ldapauth_login_validate(NULL, $form_state);
}
-c
--
Christian Yates
Mars Space Flight Facility
Arizona State University / NASA
Comments
Comment #1
retsamedoc commentedHere's an updated patch for the latest ldap_integration (6.x-1.0-beta1) module:
Comment #2
dinis commentedVery interesting, I'll test this week and report.
Comment #3
dinis commentedSo, it's working really well indeed. No issues in two weeks of use / testing (10,000 logins) :)
I do get an error in the log, but it does not seem to be critical:
Going to have a look into it later.
Comment #4
chrisyates commented