alex-rad / laravel-ldap-credentials
Extends Database and Eloquent User Authentication Providers (Laravel framework) to validate credentials (email and password) in LDAP
Installs: 354
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 2
Open Issues: 1
pkg:composer/alex-rad/laravel-ldap-credentials
Requires
- php: >=5.5
- laravel/framework: ^5.1
This package is not auto-updated.
Last update: 2025-11-09 00:02:12 UTC
README
Extends Database and Eloquent User Authentication Drivers (Laravel framework) to validate credentials (email and password) in LDAP.
Password field should be removed from Users table and model.
It does not support to reset password by email and new user registration.
Installation
-
Run
composer require "alex-rad/laravel-ldap-credentials"to install package. -
Add LdapCredentials Service Provider to the
config/app.phpconfiguration file.'providers' => [ ... LdapCredentials\Auth\AuthServiceProvider::class, ... ],
-
Add LDAP settings to the
config/auth.phpconfiguration file./* |-------------------------------------------------------------------------- | LDAP Settings |-------------------------------------------------------------------------- | | For "databaseLdapCredentials" or "eloquentLdapCredentials" user | authentication drivers. | */ 'ldap' => [ 'host' => env('LDAP_HOST', 'ldap.server.com'), 'port' => env('LDAP_PORT', 389), 'user' => env('LDAP_USER', NULL), 'password' => env('LDAP_PASSWORD', NULL), 'base' => env('LDAP_BASE', ''), ],
-
Add LDAP settings to the environment
.ENVconfiguration file (optional).LDAP_HOST=ldap.company.com -
Switch User Authentication Driver to
databaseLdapCredentialsoreloquentLdapCredentialsdriver inconfig/auth.phpconfiguration file.'driver' => 'eloquentLdapCredentials',
or
'driver' => 'databaseLdapCredentials',
-
Remove reset password by email and new user registration functions from application.