Lucterios2 / django_auth_ldap3_ad

Simple LDAP/AD auth module for django
https://pypi.python.org/pypi/django-auth-ldap3-ad
GNU General Public License v3.0
45 stars 25 forks source link

ImproperlyConfigured - unable to get it to work #14

Closed harkamals closed 7 years ago

harkamals commented 7 years ago

Hi, I am new to django, appreicate any help in using AD authentication, thanks much!

\lib\site-packages\django_auth_ldap3_ad\auth.py in init_and_get_ldap_user, line 91

povtux commented 7 years ago

Hi, On the last version, the ImproperlyConfigured exception raised at line 91 as in your request is after having checked that the LDAP_GROUPS_SEARCH_FILTER, LDAP_GROUP_MEMBER_ATTRIBUTE and LDAP_GROUPS_MAP are present in the configuration.

Do you have the three configs? if not, add only the missing ones even if they are empty like that:

GROUPS_SEARCH_FILTER="(&(objectClass=group))"
LDAP_GROUP_MEMBER_ATTRIBUTE="member"
LDAP_GROUPS_MAP={}

then your authentication should go. Regards

jamil666 commented 7 years ago

hello. can you provide view examle for login page?

povtux commented 7 years ago

Hi,

Sorry to begin with this remark but this is not the purpose of the issue. It would have been better to ask on a separate subject.

Nevertheless, this project aims at using Django's authentication engine and be plugged behind the scenes. So you can use any standard Django example and make it work. No need to adapt anything else than the settings file.

Regards,