我需要你的帮助。不要在这篇文章中写一篇,这是一个唯一的解释。
我尝试将我的django网站连接到ldap,我找到了官方示例,但需要帮助参数。
我可以在此字符串中使用IP:
AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com"
需要写什么来写这个字符串?
AUTH_LDAP_BIND_DN = "cn=django-agent,dc=example,dc=com"
AUTH_LDAP_BIND_PASSWORD = "phlebotinum"
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com",
我可以在哪里cn=django-agent,dc=example,dc=com
?
什么需要写用户?
ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
如果我把他写在最顶层?
再次:
AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=django,ou=groups,dc=example,dc=com",
ldap.SCOPE_SUBTREE, "(objectClass=groupOfNames)"
)
需要编写相同的参数吗?
向我解释!!