Skip to main content
Home

Built 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.

This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
3 weeks ago (2.0.1)

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.

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@wildboar/ldap

Import symbol

import * as ldap from "@wildboar/ldap";
or

Import directly with a jsr specifier

import * as ldap from "jsr:@wildboar/ldap";

Add Package

pnpm i jsr:@wildboar/ldap
or (using pnpm 10.8 or older)
pnpm dlx jsr add @wildboar/ldap

Import symbol

import * as ldap from "@wildboar/ldap";

Add Package

yarn add jsr:@wildboar/ldap
or (using Yarn 4.8 or older)
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";