Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
ASN.1 data structures and functionality for Lightweight Directory Access Protocol (LDAP), including parsing and printing strings, encoding and decoding LDAP syntaxes, and evaluating filters.
Lightweight Directory Access Protocol PDUs in TypeScript
ASN.1 data structures and PDUs based on the ASN.1 definitions in IETF RFC 4511, which defines the Lightweight Directory Access Protocol (LDAP).
See the documentation that applies to this library and others to learn how to use this module.
Includes functions for implementing the LDAP syntaxes defined in IETF RFC 4517, functions for evaluating LDAP filters, and functions for converting LDAP data structures to strings for transfer over the wire.
Example
import { BERElement } from "@wildboar/asn1"; import { _decode_LDAPMessage } from "@wildboar/ldap"; // Handle a request received over TCP. const el = new BERElement();; el.fromBytes(requestBytes); // Throws if a full LDAPMessage is not received yet. // The above returns the number of bytes read. const request = _decode_LDAPMessage(el); if (request.protocolOp === "bindRequest") { const bindRequest = request.protocolOp.bindRequest; const namestr = Buffer.from(bindRequest.name).toString("utf8"); console.log(`Binding as ${namestr}`); }
ASN.1 Compiler
These libraries were generated entirely or in part by the ASN.1 Compilation Service offered by Wildboar Software. The ASN.1 compiler itself is closed-source and proprietary, but some of the libraries produced with it are released publicly under the MIT license.
If you would like to see additional ASN.1 libraries in TypeScript or other programming languages, or if you have any other questions, please contact us at contact@wildboarsoftware.com.
ESM-Only
As of June 12th, 2025, this module is only compiled to ESM. CommonJS will no longer be supported.
Add Package
deno add jsr:@wildboar/ldap
Import symbol
import * as ldap from "@wildboar/ldap";
Import directly with a jsr specifier
import * as ldap from "jsr:@wildboar/ldap";
Add Package
pnpm i jsr:@wildboar/ldap
pnpm dlx jsr add @wildboar/ldap
Import symbol
import * as ldap from "@wildboar/ldap";
Add Package
yarn add jsr:@wildboar/ldap
yarn dlx jsr add @wildboar/ldap
Import symbol
import * as ldap from "@wildboar/ldap";
Add Package
vlt install jsr:@wildboar/ldap
Import symbol
import * as ldap from "@wildboar/ldap";
Add Package
npx jsr add @wildboar/ldap
Import symbol
import * as ldap from "@wildboar/ldap";
Add Package
bunx jsr add @wildboar/ldap
Import symbol
import * as ldap from "@wildboar/ldap";