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

Add a method for getting all users? #3

Open
thedjdoorn opened this issue Apr 27, 2020 · 3 comments
Open

Add a method for getting all users? #3

thedjdoorn opened this issue Apr 27, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@thedjdoorn
Copy link

This would allow for more specific user management without needing an explicit username or password, something like:

  // auth with admin
  let options = {
    ldapOpts: {
      url: 'ldap://example.com',
      // tlsOptions: { rejectUnauthorized: false }
    },
    adminDn: 'cn=read-only-admin,dc=example,dc=com',
    adminPassword: 'password'
    // starttls: false
  }
  
  let user = await users(options)
  console.log(user)

A query for that would look like "uid=*,ou=people,dc=example,dc=com", I think this could be a great improvement to make the library powerful while also keeping it simple.

@shaozi shaozi added the enhancement New feature or request label Apr 28, 2020
@shaozi
Copy link
Owner

shaozi commented Sep 18, 2020

I am debating if we should include this feature. The purpose of ldap-authentication is as the name indicates, authenticate a user. Adding getting all users may diverge from that goal.

@mehmetkarakamis
Copy link

This feature would be great, I also need it.

@fabiang
Copy link
Contributor

fabiang commented Oct 10, 2022

Just a note when implementing this: all LDAP servers have a limit how many entries will be returned when doing a simple search() (usually 1000). So when implementing this, add paged: true as option for ldapjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants