Laravel ZendLDAP Auth
- Laravel v.3
- Zend Framework v.1
- LDAP ( OpenLDAP or AD etc... )
This bundles include 3 libraries only.
- Application
- Ldap
- Loader
Disable , If you already use zend framework v.1
bundles/zendldapauth/start.php
set_include_path(implode(PATH_SEPARATOR, array(
__DIR__ . '/libraries',
get_include_path(),
)));
require_once Bundle::path('zendldapauth') . '/libraries/Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
application/config/auth.php
// change to zendldapauth
'driver' => 'zendldapauth',
application/bundles.php
return array(
'zendldapauth' => array(
'auto' => true
)
);
application/config/auth.php
// Examples with Openldap
'ldap' => array(
'host' => 'localhost',
'username' => 'uid=test,ou=people,dc=example,dc=com',
'password' => 'test',
'bindRequiresDn' => true,
'accountFilterFormat' => '(uid=%s)',
'accountDomainName' => 'example.com',
'accountDomainNameShort' => 'example',
// request for get RDN
'accountCanonicalForm' => 1, // ACCTNAME_FORM_DN
'baseDn' => 'ou=people,dc=example,dc=com',
),
'ldap_options' => array(
// request for Auth::user() , return attributes after login
'attributes' => array('dn','uid','cn','sn','givenname','pwdchangedtime'),
),
- Zend Framework LDAP http://framework.zend.com/manual/1.12/en/zend.ldap.html