fix(ldapjs): add required lib

This commit is contained in:
dancingCycle 2023-05-12 10:05:53 +02:00
parent c042e0f0eb
commit f36d95b321
3 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,8 @@
var ldapClient = ldap.createClient({url:'ldaps://srv-dc.vbn-gmbh.local:636'}, function (err){
const ldap = require('ldapjs');
xvar ldapClient = ldap.createClient({
url:'ldaps://srv-dc.vbn-gmbh.local:636'
}, function (err){
if (err) {
console.log('Failed');
process.exit(1);

View File

@ -1,3 +1,5 @@
const ldap = require('ldapjs');
var ldapClient = ldap.createClient({url:'ldaps://srv-dc.vbn-gmbh.local:636'}, function (err){
if (err) {
console.log('Failed');

View File

@ -11,7 +11,7 @@ client.on('connectError', (err) => {
client.bind('cn=Begerad\, Stefan', 'secret', (err) => {
assert.ifError(err);
console.error('Error?!');
console.error('Bind error?!');
});
const opts = {
@ -39,3 +39,8 @@ client.search('o=example', opts, (err, res) => {
console.log('status: ' + result.status);
});
});
client.unbind((err) => {
assert.ifError(err);
console.error('Unbind error?!');
});