aparticka / laravel-auth-ldap
Laravel 5 LDAP Authentication Driver
Installs: 2 827
Dependents: 0
Suggesters: 0
Security: 0
Stars: 23
Watchers: 4
Forks: 4
Open Issues: 2
pkg:composer/aparticka/laravel-auth-ldap
Requires
- php: >=5.4.0
- laravel/framework: ~5.0
- strebl/adldap: ~4.0
Requires (Dev)
- mockery/mockery: 0.9.*
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2025-10-25 23:21:36 UTC
README
LDAP authentication driver for Laravel 5
Installation
Adding via Composer
Add to composer.json and install with composer install
{
require: {
"aparticka/laravel-auth-ldap": "dev-master"
}
}
or use composer require aparticka/laravel-auth-ldap
Add to Laravel
Modify your config/app.php file and add the service provider to the providers array.
'LaravelAuthLdap\AuthLdapServiceProvider'
Copy the configuration files to your app.
php artisan vendor:publish --provider="LaravelAuthLdap\AuthLdapServiceProvider"
Update your config/auth.php to use the ldap driver.
'driver' => 'ldap'
Configuration
There are two configuration files included, one for general options - auth-ldap.php and one for the included LDAP provider adLDAP - adldap.php.
auth-ldap.php
providerarray- secondary provider to be used for authdriverstring- the driver to usemust_existbool- if the user must exist in the provider to log in
convert_fieldsarray- maps dynamic properties on theAuthenticatableuser objectcredentials_fieldsarray- the field names used for user credentialsusernamestring- the authentication field name used for the usernamepasswordstring- the authentication field name used for the password
username_fieldstring- the LDAP field used for the username
adldap.php
Configuration variables used in creation of the adLDAP client. Documentation
Extending
If you wish to extend any of the classes, just add your own service provider and bind your custom implementations to the provided interfaces. The provided implementations were designed to be extended so you can use them as a base to extend from if you wish.
License
laravel-auth-ldap is distributed under the terms of the MIT license.
About
Created by Adam Particka (aparticka)