Skip to content

Commit 537d012

Browse files
committed
docs: add get_connection docstring
1 parent d6178bc commit 537d012

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ldapauthenticator/ldapauthenticator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@ def resolve_username(self, username_supplied_by_user):
365365
return (user_dn, response[0]["dn"])
366366

367367
def get_connection(self, userdn, password):
368+
"""
369+
Returns a ldap3 Connection object automatically bound to the user.
370+
371+
ldap3 Connection ref: https://ldap3.readthedocs.io/en/latest/connection.html
372+
"""
368373
if self.tls_strategy == TlsStrategy.on_connect:
369374
use_ssl = True
370375
auto_bind = ldap3.AUTO_BIND_NO_TLS

0 commit comments

Comments
 (0)