UNPKG

605 BMarkdownView Raw
1# ldap-client
2This is a simple wrapper library to make it easier to do basic LDAP operations
3like changing a password, resetting a password, and authenticating.
4
5## Usage
6```js
7const ldapClient = require('ldap-client')
8const url = 'ldaps://ad1.dcloud.cisco.com:636/'
9const baseDn = 'DC=dcloud,DC=cisco,DC=com'
10const upn = 'sjeffers@dcloud.cisco.com'
11const password = 'C1sco12345'
12
13// init client
14let ldap = new ldapClient(url, baseDn)
15
16// attempt authentication
17ldap.authenticate({ upn, password })
18.then(() => {
19 console.log('authentication successful')
20})
21.catch(error => {
22 console.log(error)
23})
24```