We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 822d884 commit 66e8e5dCopy full SHA for 66e8e5d
app/service/login_handlers/default.py
@@ -58,6 +58,8 @@ async def _ldap_login(self, username, password):
58
dn = self._ldap_config.get('dn')
59
user_attr = self._ldap_config.get('user_attr') or 'uid'
60
user_string = '%s=%s,%s' % (user_attr, username, dn)
61
+ user_format_string = self._ldap_config.get("user_format") or "{user_attr}={user},{dn}"
62
+ user_string = user_format_string.format(user_attr=user_attr, user=username, dn=dn)
63
64
try:
65
with ldap3.Connection(server, user=user_string, password=password) as conn:
0 commit comments