Skip to content

Commit

Permalink
DEBUG: Get the code back to the behaivor before changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kota Tsuyuzaki committed Jan 13, 2021
1 parent 86dec86 commit c94c167
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ldapauthenticator/ldapauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def resolve_username(self, username_supplied_by_user):

return (user_dn, response[0]["dn"])

def get_connection(self, userdn, password):
def _fake_get_connection(self, userdn, password):
try:
return self._get_real_connection(
userdn, password, self.server_address, self.server_port
Expand All @@ -342,12 +342,11 @@ def get_connection(self, userdn, password):
# re-raise the last caught error
raise

def _get_real_connection(self, userdn, password, server_address, server_port):
def get_connection(self, userdn, password):
server = ldap3.Server(
server_address,
port=server_port,
self.server_address,
port=self.server_port,
use_ssl=self.use_ssl,
connect_timeout=self.connect_timeout,
)
auto_bind = (
ldap3.AUTO_BIND_NO_TLS if self.use_ssl else ldap3.AUTO_BIND_TLS_BEFORE_BIND
Expand Down

0 comments on commit c94c167

Please sign in to comment.