0.1.9 • Published 3 years ago

@ppprisma/gm-ldap-client v0.1.9

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

LDAP-TS

Used for connecting to an AD server. Originally used in Gradesmanager. Uses LDAPJS library.

Original Authors

Updated by

Client usage

import { DnParser, LdapClient } from '@ppprisma/gm-ldap-client';

const url = 'ldap://192.168.1.10:389';
// Instatiate a new client.
const client = new LdapClient(url);
// Bind to enable communcation with ldap server.
// You should use `process.env` and not put these
// credentials directly into your code like the example.
await client.bind('CN=your_user,DC=your,DC=domain', 'your_password'); // Now you can interact with the server

// Environment configuration.
const config = {
  base: 'DC=your,DC=base,DC=domain',
  studentsOU: 'students_ou',
  teachersOU: 'teachers_ou'
};
// Get a DN for a username (SAMAccountName).
const dn = await client.getDnFor('user.name', config);
0.1.8

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago