Remove ldapjs: unable to bind (#1118)
This commit is contained in:
parent
63e2b66674
commit
83ab7d59bc
|
@ -1,32 +0,0 @@
|
||||||
var ldap = require('ldapjs');
|
|
||||||
|
|
||||||
var server = ldap.createServer();
|
|
||||||
|
|
||||||
server.search('dc=example,dc=com', function(req, res, next) {
|
|
||||||
var obj = [{
|
|
||||||
dn: 'dc=example,dc=com',
|
|
||||||
attributes: {
|
|
||||||
objectclass: ['dcObject', 'organization'],
|
|
||||||
o: 'example',
|
|
||||||
dc: 'example'
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
dn: 'uid=dwho,dc=example,dc=com',
|
|
||||||
attributes: {
|
|
||||||
objectclass: ['inetOrgPerson'],
|
|
||||||
uid: 'dwho',
|
|
||||||
cn: 'Dr Who',
|
|
||||||
mail: 'dwho@badwolf.org'
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
|
|
||||||
for(var i=0; i<obj.length;i++) {
|
|
||||||
console.log(obj[i]);
|
|
||||||
if (req.filter.matches(obj[i])) res.send(obj);
|
|
||||||
}
|
|
||||||
res.end();
|
|
||||||
});
|
|
||||||
|
|
||||||
server.listen(1389, function() {
|
|
||||||
console.log('LDAP server listening at %s', server.url);
|
|
||||||
});
|
|
Loading…
Reference in New Issue
Block a user