roshangautam / sentinel-ldap
There is no license information available for the latest version (dev-master) of this package.
dev-master
2016-05-25 13:04 UTC
Requires
- php: >=5.4.0
- cartalyst/sentinel: ~2.0
- cartalyst/support: ~1.0
- illuminate/support: 5.0.*
This package is auto-updated.
Last update: 2024-12-06 16:47:12 UTC
README
Sentinel LDAP is a Cartalyst Sentinel
addon and lets you authenticate your users using LDAP (Active Directory).
The package requires PHP 5.4+ and comes bundled with a Laravel 4 Facade and a Service Provider to simplify the optional framework integration and follows the FIG standard PSR-4 to ensure a high level of interoperability between shared PHP code. The package also requires that you have php5-ldap extension installed in your server.
Installation
Sentinel LDAP is installable with Composer. Follow the instructions below
- Copy the following line in your composer.json "require" section.
"roshangautam/sentinel-ldap": "dev-master",
- Run composer update
- Run php artisan config:publish roshangautam/sentinel-ldap
- Open app/config/packages/roshangautam/sentinel-ldap/config.php and populate the parameters
- Open app/config/app.php and include 'Roshangautam\Sentinel\Addons\Ldap\Laravel\LdapServiceProvider' in providers array and 'LDAP' => 'Roshangautam\Sentinel\Addons\Ldap\Laravel\Facades\Ldap' in aliases array
- To enable LDAP login use LDAP::authenticate instead of using Sentinel::authenticate.
Thats it. Have fun.
Config Parameters
'ldap' => [
'host' => 'ldaps://yourcompany.com:3269', // This is the ldap host preferable a Global Catalog if you have multiple ldap servers. Also prepend :port if you are using a url instead of hostname (php5-ldap requirement as it will ignore the port parameter while using URL)
'port' => 389, // port number while using hostname instead of url
'search_user_dn' => 'CN=Some User,OU=SomeGroup,OU=SomeGroup,DC=yourcompany,DC=com', // search user - ask your ldap adminstrator for this
'search_base' => 'DC=yourcompany,DC=com', // usually root of your domain
'login_attribute' => 'sAMAccountName', // currently unused
'search_password' => 'yourpassword', // password for the search user - ask your ldap administrator
],