Skip to main content
nestrs-ldap binds as username / password against a directory (ldap3). Ok(()) means the server accepted the bind. Nest’s passport-ldap strategy is the analogue.

Install

Bind

{username} in bind_dn_template is replaced with the login name:
From a login handler, map LdapAuthError to 401 when the bind fails:
Prefer ldaps:// in production. This crate uses ldap3 with default TLS features off at the crate level — enable TLS in your deployment (stunnel, ldaps, or a fork that turns ldap3 TLS on) if the directory requires it.

API