Skip to content

Commit

Permalink
cleanup: cleanup of unreachable code
Browse files Browse the repository at this point in the history
Either we would have bound the connection thanks to auto_bind, or we
would have had an unhandled error. Due to this, we can remove this.
  • Loading branch information
consideRatio committed Sep 17, 2024
1 parent fde899f commit 9bf1cc8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ldapauthenticator/ldapauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,6 @@ def resolve_username(self, username_supplied_by_user):
userdn=self.lookup_dn_search_user,
password=self.lookup_dn_search_password,
)
if not conn.bind():
self.log.warning(
f"Failed to connect to LDAP server with search user '{self.lookup_dn_search_user}'"
)
return (None, None)

search_filter = self.lookup_dn_search_filter.format(
login_attr=self.user_attribute,
Expand Down

0 comments on commit 9bf1cc8

Please sign in to comment.