I should make a request to LDAP client side possibly with Javascript. I searched in the web finding ldapjs that does what I want, but server side. This:
var ldap = require('ldapjs');
var server = ldap.createServer();
server.search('o=example', function(req, res, next) {
var obj = {
dn: req.dn.toString(),
attributes: {
objectclass: ['organization', 'top'],
o: 'example'
}
};
if (req.filter.matches(obj.attributes))
res.send(obj);
res.end();
});
server.listen(1389, function() {
console.log('LDAP server listening at %s', server.url);
});
So I tried using requirejs to import a library ldapjs client side, but was unable to make it work. There is no file called ldapjs to import. I'm on the right track? There are other ways?
I'm forced to stay on the client side