I asked this question in the Services Bug tracker but was directed here. Here is the original issue: http://drupal.org/node/1286482#comment-5019286. I cannot authenticate LDAP users via services. What would be the best way of going about creating a module to facilitate this feature? As of now, it seems like the logic is built right into the alter form hook. I'd like to be able to help in any way that I can with this feature request.

Comments

johnbarclay’s picture

I believe this is a similar question to having SSO, NTLM in the ldap project. I can't really answer it without a quick summary of what functionality you want. But I'm thinking you want a webservice for authentication that leverages ldap credential testings and user mapping. My thoughts below are based on this assumption.

This makes sense to be in this project or a separate, dependent module because:
- much of the user to ldap mapping logic/interface will be the same
- the ldap server configuration would also
- such a webservice would have the potential to leverage user profile data and/or authorization data

Whether its a separate module or a module in this project largely depends on you. If you want it in ldap authentication, the additional work would be simpletests for it. There simply isn't a high enough volunteer commitment to the ldap module to keep adding code that doesn't have regression testing in it. Good documentation would also be a plus.

My feeling is a module like ldap_services that had the core function library in it would do the trick. It could have a number of webservices (test_credentials, user_ldap_data, user_authorization_data, etc.) that invoked hooks for other ldap modules to provide data for.

mrryanjohnston’s picture

Just a heads up, I created a module for this issue: http://drupal.org/sandbox/mrryanjohnston/1289212

It's only a sandbox project, so use at your own discretion.

branana’s picture

http://drupal.org/sandbox/branana/1300714

"Services user login methods", allows you to write plugins such as in #2 to hook into what kind of logins are supported via Services user.login resource

johnbarclay’s picture

Status: Active » Postponed
jaarong’s picture

Interested in this as well

pebosi’s picture

Any update on this?

ajlow’s picture

Issue summary: View changes

@jaarong and @pebosi.

I have used what myryanjohnston has written in #2 and it works fine.

Please note that if you do use the module, you must also include the patch: https://www.drupal.org/node/1959108. In addition, you need to add an extra line of code to include the CSRF token. You will see my comment on this when you navigate to the patch.

BTW thank you, mrryanjohnston for the code! :)

larowlan’s picture

Status: Postponed » Closed (won't fix)

No update in > 12 months, no patches - closing

sandbox for those who're interested in custom functionality

fred r’s picture

The sandbox module in #2 and the patch #7 works fine for me, thank you.

agerson’s picture

+1 for this functionality