mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Automatically reconnect LDAP authenticator when slapd restarts (#185)
* Fix LDAP authenticator when slapd was restarted * Update parameter for LDAP reconnection
This commit is contained in:
parent
9a8b5c080a
commit
a3436d1146
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ class Authenticator(BaseAuthenticator):
|
||||||
|
|
||||||
def authenticate(self, password):
|
def authenticate(self, password):
|
||||||
try:
|
try:
|
||||||
con = ldap.initialize(self.uri)
|
con = ldap.ldapobject.ReconnectLDAPObject(self.uri, retry_max=10, retry_delay=0.5)
|
||||||
if self.userdn:
|
if self.userdn:
|
||||||
con.simple_bind_s(self.userdn, password)
|
con.simple_bind_s(self.userdn, password)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue