Expose our most used ldap functions as async/await for use across projects.
- Authentication
- Get user groups
- Expose raw ldap client
npm install 4q-node-ldap --save
const ldap = require('4q-node-ldap');
const ldapConn = await ldap.Connect(
'ldaps://ldaps.example.com',
'DC=example,DC=com',
'[email protected]',
'password',
{ /* tls options */ },
{ /* ldap options */ }
);
await ldapConn.authenticate('[email protected]', 'password');
await ldapConn.groups('[email protected]');
npm run build
Whenever this package is updated locally the changes will be available in the projects that are linked
-
Run the following command at the root of this package
npm link
-
In the project where you want to use this package link the npm package locally with
npm link 4q-node-ldap
Any changes made must first be built and then version increased before publishing
-
npm version major|minor|patch
-
npm login
-
npm publish