Commit f2511c7e authored by Bengfort's avatar Bengfort
Browse files

TG-280 settings: use ldap auth

parent dd25fbab
......@@ -79,6 +79,19 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
AUTHENTICATION_BACKENDS = [
'django_auth_ldap.backend.LDAPBackend',
'django.contrib.auth.backends.ModelBackend',
]
import ldap
from django_auth_ldap.config import LDAPSearch
AUTH_LDAP_SERVER_URI = 'ldap://localhost'
AUTH_LDAP_BIND_DN = 'cn=admin,dc=example,dc=org'
AUTH_LDAP_BIND_PASSWORD = 'admin'
AUTH_LDAP_USER_SEARCH = LDAPSearch('dc=example,dc=org', ldap.SCOPE_SUBTREE, '(uid=%(user)s)')
# Internationalization
......
......@@ -11,5 +11,6 @@ setup(
install_requires=[
"Django==2.0.4",
"django-auth-ldap==1.4.0",
],
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment