sjkingo / django_auth_ldap3

A library for connecting Django's authentication system to an LDAP directory
BSD 2-Clause "Simplified" License
23 stars 13 forks source link

Added BIND_AS_AUTHENTICATING_USER option. #21

Open vitormazzi opened 8 years ago

vitormazzi commented 8 years ago

This option allows the authentication of users with multiple unknown distinguished name (dn) formats, provided that there is at least one user whose dn is known and has the permissions to search for other users.

sjkingo commented 8 years ago

Thanks for your PR. Could you explain a little how this is different to method 2 (search and bind), except with a custom filter?

sjkingo commented 8 years ago

It would be awesome to merge this into the code as the search and bind method (issue #2) as that has been a long-standing feature I've wanted to implement.

vitormazzi commented 8 years ago

I don't have a lot of ldap knowledge, so I'm not really sure about the differences. That is the main reason I proposed this code as a third authentication method.

The only incompatible point I see at this moment is that the search step in search and bind could be anonymous (is that right?), and in my code it requires a valid password. Do you see anything else?