Modules@robinpath/ldap

@robinpath/ldap

0.1.1Public

LDAP client module for interacting with LDAP directories. Supports connecting, binding, searching, adding, modifying, and deleting entries. Includes convenience functions for user authentication, user lookup, and group membership queries.

@robinpath/ldap

LDAP client module for interacting with LDAP directories. Supports connecting, binding, searching, adding, modifying, and deleting entries. Includes convenience functions for user authentication, user lookup, and group membership queries.

Category Functions Auth License

Why use this module?

The ldap module lets you:

  • Search for entries in the LDAP directory
  • Authenticate (bind) to the LDAP server with a DN and password
  • Unbind and disconnect from the LDAP server
  • Add a new entry to the LDAP directory
  • Modify an existing LDAP entry's attributes

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/ldap

Quick Start

1. Set up credentials

ldap.connect "your-credentials"

2. Search for entries in the LDAP directory

ldap.search

Available Functions

FunctionDescription
ldap.connectCreate and connect an LDAP client to a server
ldap.searchSearch for entries in the LDAP directory
ldap.bindAuthenticate (bind) to the LDAP server with a DN and password
ldap.unbindUnbind and disconnect from the LDAP server
ldap.addAdd a new entry to the LDAP directory
ldap.modifyModify an existing LDAP entry's attributes
ldap.delDelete an entry from the LDAP directory
ldap.compareCompare an attribute value against an LDAP entry
ldap.modifyDNRename an LDAP entry by changing its DN
ldap.findUserConvenience function to search for a user by username
ldap.authenticateAuthenticate a user by searching for their DN and then binding with their password
ldap.groupsGet all groups that a user belongs to
ldap.closeForcefully close the LDAP client connection and clean up resources
ldap.isConnectedCheck if the LDAP client is currently connected

Examples

Search for entries in the LDAP directory

ldap.search

Authenticate (bind) to the LDAP server with a DN and password

ldap.bind

Unbind and disconnect from the LDAP server

ldap.unbind

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/ldap";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  ldap.connect "your-credentials"
  ldap.search
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.1latestyesterday
Install
$ robinpath install @robinpath/ldap
Version0.1.1
LicenseMIT
Unpacked Size5.7 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

utilities