npm.io
1.0.29 • Published 4d ago

w-ldap

Licence
MIT
Version
1.0.29
Deps
1
Size
18.0 MB
Vulns
0
Weekly
0

w-ldap

A LDAP tool for windows.

language npm version license npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Core

w-ldap is based on the Microsoft .Net Framework, and only run in Windows.

Installation

Using npm(ES6 module):
npm i w-ldap
Example:

Link: [dev source code]

import WLdap from 'w-ldap'

async function test() {
    let inp
    let r
    let account = '{account}'
    let password = '{password}'
    let ldappath = 'LDAP://{PATH}'

    inp = {
        mode: 'logIn',
        account,
        password,
        ldappath,
    }
    r = await WLdap(inp)
    console.log('logIn', r)
    w.fsWriteText('logIn.txt', w.o2j(r, true))

    inp = {
        mode: 'listUsers',
        account,
        password,
        ldappath,
    }
    r = await WLdap(inp)
    w.fsWriteText('listUsers.txt', w.o2j(r, true))

}
test()
    .catch((err) => {
        console.log('catch', err)
    })

// => logIn {
//     //LDAP user information
// }
// see logIn.txt and listUsers.txt for details

Keywords