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

Using username in filter #7

Open
shaneholder opened this issue Jul 22, 2013 · 2 comments
Open

Using username in filter #7

shaneholder opened this issue Jul 22, 2013 · 2 comments

Comments

@shaneholder
Copy link

I'm looking to use passport-ldap in a project and I wanted to make sure I understand something, it looks like the user/password are bound but then all entries in the searchFilter are returned and not just the entry associated with the user who was authenticated, is this correct? Is there a reason to not use the username in the filter?

Thanks,
Shane

@shaneholder
Copy link
Author

I just saw the latest PR and saw that the code merge to support uid substitution but I'm not sure it's correct. It seems to replace the original search filter with the substitution, and then subsequent substitutions use the original replaced value. Perhaps I'm missing something?

      self._options.search.filter = self._options.search.filter.replace(/\$uid\$/, req.body.username);

also replacing req.body.username with req.body.user seems to not be inline with passport functionality.

Thanks,
Shane.

@mintbridge
Copy link
Owner

does the example help with this?

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

No branches or pull requests

2 participants