1.0.0 • Published 5 years ago
epfl-ldap v1.0.0
epfl-ldap
Simple wrapper to query the EPFL LDAP.
Usage
/*
* Public
*/
var publicLdapContext = require('epfl-ldap')();
publicLdapContext.users.getUserBySciper(169419, function(err, data) {
console.log(JSON.stringify(data, null, 2));
});
/*
* Full
*/
var fullLdapContext = require('epfl-ldap')();
fullLdapContext.options.modelsMapper = fullLdapContext.viewModelsMappers.full;
fullLdapContext.users.getUserBySciper(169419, function (err, data) {
console.log(JSON.stringify(data, null, 2));
});
/*
* Custom
*/
var customLdapContext = require('epfl-ldap')();
var customModelsMapper = customLdapContext.viewModelsMappers.custom;
customModelsMapper.userSchema = {
displayName: {
key: 'displayName'
},
emails: {
key: 'emails'
}
};
customLdapContext.options.modelsMapper = customModelsMapper;
customLdapContext.users.getUserBySciper(169419, function (err, data) {
console.log(JSON.stringify(data, null, 2));
});
/*
* Custom Options
*/
var publicLdapContext = require('epfl-ldap')({
searchBase:'ou=si-idev,ou=si,o=epfl,c=ch',
poolSize: 4
});
publicLdapContext.users.getUserBySciper(169419, function(err, data) {
console.log(JSON.stringify(data, null, 2));
});
Notes
⚠ Carefull with the results formats (Object or Array)
⚠ this library "try" to use ES2015 (or ES6) capabilities, don't use it with nodejs under 5.x?
1.0.0
5 years ago
0.9.0
5 years ago
0.8.0
5 years ago
0.7.0
5 years ago
0.6.0
5 years ago
0.5.0
8 years ago
0.4.0
9 years ago
0.3.2
9 years ago
0.3.1
9 years ago
0.3.0
9 years ago
0.2.0
9 years ago
0.1.9
9 years ago
0.1.8
9 years ago
0.1.7
9 years ago
0.1.6
9 years ago
0.1.5
9 years ago
0.1.4
9 years ago
0.1.3
9 years ago
0.1.2
9 years ago
0.1.1
9 years ago
0.1.0
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago