1.0.1 • Published 5 years ago

uci-ldap-search v1.0.1

Weekly downloads
14
License
BSD-3-Clause
Repository
github
Last release
5 years ago

uci-ldap-search

A search tool based on ldapjs which adds UCI's LDAP base and allows non-credentialed search to the extent allowable by OIT. UCI OIT LDAP information located here.

It's very simple so far and has very little concept of searches, but it is a minor step to make ldap more accessible to those who just need to search quickly for basic information like campus_id, name, email, phone number, etc. only things which one can already get from the directory and campus_id.

Install

$ npm install --save uci-ldap-search

Usage

It only has two functions presently, searchBy which takes a raw filter, and searchByNetID with takes a UCINetID.

var Ldap = require('uci-ldap-search');

Ldap.searchByNetID('rhett', function (err, data) {
  if (err) {
    throw err;
  }
  
  console.log(data); // object of ldap data
});

// Use like searching.
var useLike = true;
Ldap.searchByNetID('hett', useLike, function (err, data) {
  if (err) {
    throw err;
  }
 
  console.log(data); // array of objects of ldap data
});

Ldap.searchBy('(&(cn=Rhett *)(uid=rhett))', function (err, data) {
  if (err) {
    throw err;
  }
  
  console.log(data); // object of ldap data
});

Todo

  • Add array input for searchByNetID
  • Make functions then-able using promises
  • Add ability to authenticate for non-public usage

License

See LICENSE for full info.

Contributors

Contributions

By all means, if you know LDAP better than me (which is just about everyone), jump right in with a fork and a pull request!

1.0.1

5 years ago

1.0.0

5 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago