First, thanks for the great module.

I would really like to use this module, but I'm using external LDAP server to store the user accounts with the help of the ldap_integration project http://drupal.org/project/ldap_integration. The problem is that in the httpauth module an authentication function user_authenticate() is hardcoded. LDAP integration is using a ldapauth_authenticate() function as a replacement of the core drupal user_authenticate().

The patch I'm proposing allows entering a custom authentication function as a configuration option. Also include files needed for the new authentication function could be specified in the configuration area.

I would appreciate if you could include this patch into the module.

CommentFileSizeAuthor
a.patch3.62 KBmiglius

Comments

decafdennis’s picture

Hmm, have you thought about doing all of this automatically using drupal_execute on the user_login form?

miglius’s picture

I'm using ldapauth module for the user login. What it does is it changes user_login form $form['#validate'] handler in the hook_form_alter() so that a new function can be called instead of user_authenticate().

httpauth is invoking authentication in the hook_boot() and with a very small weight - before of the most modules. So anyway I would need to load ldapauth module with it's include files before the drupal_execute() is called.

Also I'm not sure if hook_form_alter() in the ldapauth module would be triggered when druplal_execute() is called from the hook_boot(). Form includes should be loaded before that. But if the form is altered, then I think drupal_execute() could work.

nschloe’s picture

hi,

any news on this one?

we're having the exact same issue as miglius here, and a fix would be appreciated.

miglius, could you please post what values i'd have to put in the new fields when using your patch to get it to work with ldap_integration?

cheers,
nico

miglius’s picture

Alternative login function:

ldapauth_authenticate

A module providing login function:

ldapauth

Module's include files:

ldap_integration/LDAPInterface.php

Include files:

includes/common.inc
includes/unicode.inc

decafdennis’s picture

Status: Needs review » Closed (won't fix)

HTTP authentication (at least the 6.x branch) will be deprecated in favour of Secure Site.

Secure Site is supposed to work with ldapauth_authenticate.