diff --git a/fet2020/authentications/authentications.py b/fet2020/authentications/authentications.py index e8dd687f..96084b5b 100644 --- a/fet2020/authentications/authentications.py +++ b/fet2020/authentications/authentications.py @@ -14,11 +14,16 @@ def authentication(username, password): if password is None or password.strip() == "": return None - server = Server(host, port=port, use_ssl=True) + server = Server(host, port=port) userdn = f"uid={username},ou=user,dc=fet,dc=htu,dc=tuwien,dc=ac,dc=at" try: - c = Connection(server, user=userdn, password=password, auto_bind=True) + c = Connection(server, user=userdn, password=password) + + # perform the Bind operation + if not c.bind(): + print('error in bind', c.result) + if c.extend.standard.who_am_i(): return username