Skip to content

aborigines/laravel-zendldapauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel ZendLDAP Auth

Laravel ZendLDAP Auth

Requirement

  • Laravel v.3
  • Zend Framework v.1
  • LDAP ( OpenLDAP or AD etc... )

Pre-Config

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();

Config

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'),
	),

Document

Thanks

About

Laravel ZendLDAP Authen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages