Open weierophinney opened 4 years ago
Regarding your 3rd Question: You should always first bind with a known user to the LDAP, then search for the user that tries to log in with the provided information and then (re)bind to the ldap with the DN of the found user and the provided password.
That way you are
a) LDAP-compliant and b) have the possibility to use any (unique) attribute to identify a user.
I'm using that so users can use there email-address or their UID to log into the systems.
Have a look for a plain PHP-Implementation here
Originally posted by @heiglandreas at https://github.com/zendframework/zend-authentication/issues/31#issuecomment-312181076
From what I've seen right now in Zend\Authentication\Adapter\Ldap that's not an LDAP-Adapter but an AD-Adapter (or an adapter where all users are known to be part of one subtree) as the described way of authentication via retrieve user after a bind with a privileged user doesn't seem to be supported… Or I'm missing it ATM…
So it looks to me as there's a complete authentication-adapter missing. And that's the one you're looking for…
Originally posted by @heiglandreas at https://github.com/zendframework/zend-authentication/issues/31#issuecomment-312183409
I've hacked together a gist that might help you creating a solution. Take care, it's not been tested!!
Originally posted by @heiglandreas at https://github.com/zendframework/zend-authentication/issues/31#issuecomment-312191510
Hello, for internal user authentication we will use LDAP Adapter and for external users the Zend DB Adapter. All external users uses the mail address as username. Also with the LDAP Adapter we will use the email address as username. We have more external than internal users.
@heiglandreas
Originally posted by @mano87 at https://github.com/zendframework/zend-authentication/issues/31