From 1b0a41e402d5a89fbfafc3f02efd7e60b3eed26c Mon Sep 17 00:00:00 2001 From: holczer Date: Wed, 17 Jun 2020 13:27:13 +0200 Subject: [PATCH] server list logging added --- radicale_auth_ldap/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/radicale_auth_ldap/__init__.py b/radicale_auth_ldap/__init__.py index 5741f5e..76887e1 100644 --- a/radicale_auth_ldap/__init__.py +++ b/radicale_auth_ldap/__init__.py @@ -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