docs: Include suggested USERNAME_ATTR in example AD ldap configs.

This commit is contained in:
Mateusz Mandera
2020-01-03 03:33:46 +01:00
committed by Tim Abbott
parent 61180020c1
commit e147ee2087

View File

@@ -223,6 +223,7 @@ of the following configurations:
ldap.SCOPE_SUBTREE, "(sAMAccountName=%(user)s)")
AUTH_LDAP_REVERSE_EMAIL_SEARCH = LDAPSearch("ou=users,dc=example,dc=com",
ldap.SCOPE_SUBTREE, "(mail=%(email)s)")
AUTH_LDAP_USERNAME_ATTR = "sAMAccountName"
```
* To access by Active Directory email address:
@@ -231,6 +232,7 @@ of the following configurations:
ldap.SCOPE_SUBTREE, "(mail=%(user)s)")
AUTH_LDAP_REVERSE_EMAIL_SEARCH = LDAPSearch("ou=users,dc=example,dc=com",
ldap.SCOPE_SUBTREE, "(mail=%(email)s)")
AUTH_LDAP_USERNAME_ATTR = "mail"
```
**If you are using LDAP for authentication**: you will need to enable