mirror of
https://github.com/jdupouy/radicale3-auth-ldap.git
synced 2024-10-27 19:14:00 +00:00
server list logging added
This commit is contained in:
parent
a3b2e41864
commit
1b0a41e402
@ -38,9 +38,14 @@ class Auth(BaseAuth):
|
||||
def is_authenticated(self, user, password):
|
||||
"""Check if ``user``/``password`` couple is valid."""
|
||||
server_list = self.configuration.get("auth", "ldap_url")
|
||||
self.logger.info("Server list type: %s" % type(server_list))
|
||||
self.logger.info("Server list: %s" % server_list)
|
||||
if ' ' in server_list: # Handle for multiple LDAP server defined in ldap_url with space separation
|
||||
self.logger.info("Server list contains multiple servers")
|
||||
servers = server_list.split(' ')
|
||||
SERVER = ldap3.ServerPool(None)
|
||||
self.logger.info("Servers type: %s" % type(serverst))
|
||||
self.logger.info("Servers: %s" % servers)
|
||||
for s in servers:
|
||||
SERVER.add(ldap3.Server(s))
|
||||
else: # only one server is defined
|
||||
|
Loading…
Reference in New Issue
Block a user