खोज…


टिप्पणियों

कई अन्य सक्रिय निर्देशिका APIS हैं, जैसे कि activedirectory2 और adldap ।

क्रियाशील अप्रत्यक्ष का उपयोग करना

नीचे दिया गया उदाहरण पूर्ण डॉक्स से लिया गया है, जो यहां (GitHub) या यहां (NPM) उपलब्ध है ।

स्थापना

npm install --save activedirectory

प्रयोग

// Initialize
var ActiveDirectory = require('activedirectory');
var config = {
    url: 'ldap://dc.domain.com',
    baseDN: 'dc=domain,dc=com'
};
var ad = new ActiveDirectory(config);
var username = '[email protected]';
var password = 'password';
// Authenticate
ad.authenticate(username, password, function(err, auth) {
    if (err) {
        console.log('ERROR: '+JSON.stringify(err));
        return;
    }
    if (auth) {
        console.log('Authenticated!');
    }
    else {
        console.log('Authentication failed!');
    }
});


Modified text is an extract of the original Stack Overflow Documentation
के तहत लाइसेंस प्राप्त है CC BY-SA 3.0
से संबद्ध नहीं है Stack Overflow