Package Data | |
---|---|
Maintainer Username: | aimme |
Maintainer Contact: | muhammadhu.aiman@gmail.com (Mohamed Aiman) |
Package Create Date: | 2016-11-09 |
Package Last Update: | 2016-11-11 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-23 03:18:20 |
Package Statistics | |
---|---|
Total Downloads: | 29 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
####Installation
1 - Require this package with composer:
composer require aimme/laravel5-ldap
2 - add provider
file: config/app.php
'providers' => [
....
Aimme\Ldap\LdapServiceProvider::class,
];
3 - add alias
file: config/app.php
'aliases' => [
....
'Ldap' => Aimme\Ldap\Facades\Ldap::class,
....
];
4 - run these artisan commands
php artisan make:ldap-auth
php artisan vendor:publish --provider="Aimme\Ldap\LdapServiceProvider"
5 - add middleware
file: app/Http/Kernel.php
protected $routeMiddleware = [
...
'ldap' => \Aimme\Ldap\Middleware\Authenticate::class,
...
];
6 - bring following configuration changes to the ldap config file
file: config/ldap.php
change providers array users model to your Eloquent user model path if it's different
~~~~ 'providers' => [ 'users' => [ 'driver' => 'ldap', 'model' => App\User::class, ], ~~~~
set your environment variables.
~~~~ 'domain' => env('LDAP_DOMAIN', 'MYDOMAIN'), 'host' => env('LDAP_HOST', 'ldap://aimme.mydomain.net'), ~~~~
See http://php.net/manual/en/function.ldap-connect.php
See http://php.net/manual/en/function.ldap-bind.php