-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find dn before login user #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot grasp the whole point of this PR, but I trust you :)
@@ -25,13 +25,39 @@ def user_checker(username, password, request): | |||
cache = request.registry.cache | |||
cache_result = cache.get(cache_key) | |||
|
|||
ldap_fqn = settings['ldap.fqn'] | |||
bind_dn = settings.get('ldap.bind_dn') | |||
bind_password = settings.get('bind.password') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not match what's in the README
# filter provided in the ldap.fqn_filters directive with the | ||
# username passed by the HTTP client. | ||
base_dn = settings['ldap.base_dn'] | ||
filters = settings['ldap.filters'].format(mail=username) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: this will fail if {mail}
is not in the filters setting. Should we raise a ConfigurationError
in case if it's not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nice way to handle this case, I will do that thanks.
r? @leplatrem