ldap-stub
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

ldap-stub

example usage

Active Directory

server

import { ActiveDirectoryServer } from 'ldap-stub';

activeDirectoryServer({
    bindDN: '',
    bindPassword: '',
    suffix: '',
    users: [{ username: '', firstName: '', lastName: '', password: '', email: '', phone: '', memberOf: [''] }],
    logger: console.log;
})

client

import { activeDirectoryClient } from 'ldap-stub';

const client = activeDirectoryClient({
    serverUrl: '',
    bindDN: '',
    bindPassword: '',
    suffix: '',
});

const user = await client.login("username", "password");

open-LDAP

server

import { openLdapServer } from 'ldap-stub';

activeDirectoryServer({
    bindUser: {
        username: '',
        password: '',
    },
    dc: ['example', 'com'],
    accounts: [{ id: '9000', username: 'user1', password: 'password1' }]
})

client

import { openLdapClient } from 'ldap-stub';

const client = openLdapClient({
    serverUrl: '',
    bindUser: {
        username: 'root',
        password: 'password',
    },
    dc: ['example', 'com'],
});

const user = await client.login("username", "password");

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    1
    • latest

Version History

Package Sidebar

Install

npm i ldap-stub

Weekly Downloads

16

Version

0.1.2

License

ISC

Unpacked Size

84.5 kB

Total Files

38

Last publish

Collaborators

  • dejvovo
  • smidhonza
  • kolebjak
  • dtourek