Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Castellum
castellum
Commits
f2511c7e
Commit
f2511c7e
authored
Apr 10, 2018
by
Bengfort
Browse files
TG-280 settings: use ldap auth
parent
dd25fbab
Changes
2
Hide whitespace changes
Inline
Side-by-side
castellum_core/castellum_core/castellum_core/settings.py
View file @
f2511c7e
...
...
@@ -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
...
...
castellum_core/setup.py
View file @
f2511c7e
...
...
@@ -11,5 +11,6 @@ setup(
install_requires
=
[
"Django==2.0.4"
,
"django-auth-ldap==1.4.0"
,
],
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment