directorytree/ldaprecord-lumen
Integrate LDAP into your Lumen app with LdapRecord-Lumen. Adds configuration and service provider support for LdapRecord so you can connect to LDAP directories, query users and groups, and authenticate via LDAP in Lumen.
DirectoryTree/LdapRecord-Laravel under the hood. This aligns well with identity management use cases (e.g., SSO, user provisioning, role-based access).LdapRecord supports custom attributes, filters, and schema mappings, enabling tailored LDAP integrations (e.g., Active Directory, OpenLDAP).LdapRecord-Laravel (v3.x), which abstracts adldap2 (a robust LDAP library). This is a mature stack but adds complexity if the team lacks LDAP experience.mockery), but real-world LDAP environments (e.g., AD) may introduce flakiness.LdapRecord could complicate future migrations if the underlying library changes (e.g., breaking API updates)./auth/ldap endpoints).LdapRecord-Laravel (non-Lumen) may be better.ldapsearch CLI tools) before coding.composer require directorytree/ldaprecord-lumen
.env with LDAP details (e.g., LDAP_HOST, LDAP_BASE_DN).LdapRecord:
$ldap = new \LdapRecord\Lumen\LdapRecord();
if ($ldap->authenticate($dn, $password)) {
// Success: attach user data to request.
}
LdapRecord’s query builder for user searches:
$users = \LdapRecord\Lumen\User::where('department', 'Engineering')->get();
mockery).389-ds).php-ldap extension (common in shared hosting but may need enabling).LdapRecord./login endpoint with LDAP middleware./users API).LdapRecord-Lumen is actively maintained (last release: 2025-03-05), but minor version bumps may require testing.composer update needed; risk of breaking changes.(&(department=Engineering)(manager=CN=...))) can be slow.| Failure Scenario | Impact | Mitigation | |-------------------------------|
How can I help you explore Laravel packages today?