wangzhibo
2026-05-09 53418655c061ac26f66058253f39200aced1ab1d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import type { LdapConfig } from "../config/types.js";
/** Escape value for use inside LDAP filter (RFC4515 subset). */
export declare function escapeLdapFilterValue(value: string): string;
export type LdapVerifyResult = {
    ok: true;
} | {
    ok: false;
    reason: "invalid_credentials" | "user_not_found" | "connection_error";
};
/**
 * Verify username/password against AD/LDAP:
 * service bind → search user DN → bind as user with password.
 */
export declare function verifyCredentials(username: string, password: string, cfg: LdapConfig): Promise<LdapVerifyResult>;