Skip to content
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

Merged
merged 8 commits into from
Nov 23, 2016
Merged

Find dn before login user #16

merged 8 commits into from
Nov 23, 2016

Conversation

Natim
Copy link
Member

@Natim Natim commented Nov 23, 2016

Copy link
Contributor

@leplatrem leplatrem left a 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')
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Member Author

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.

@Natim Natim merged commit 3690925 into master Nov 23, 2016
@Natim Natim deleted the find_dn_before_login_user branch November 23, 2016 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants