Auth_Ldap: LDAP Authentication Library for CodeIgniter
This was first presented in my post LDAP Authentication with CodeIgniter. This is just a simple library that wraps up the necessary LDAP calls to authenticate a user against LDAP and then set a session cookie that identifies the user as logged in.
Usage is relatively simple: unpack the archive and copy the files into the appropriate CodeIgniter libraries for your application. This usually just means mirroring the directory structure in the zip file over to your CodeIgniter install. The directory structure should look something like this:
|
1 2 3 4 5 6 7 8 9 10 11 12 |
application/ |-- config/ | `authldap.php |-- controllers/ | ` auth.php |-- libraries/ | `AuthLDAP.php `-- views/ `-- auth/ |-- login_form.php |-- logout_view.php `-- success_view.php |
The files controllers/auth.php, views/auth/login_form.php, and views/auth/logout_view.php are not necessary for the functionality of the library and are provided as an example of how to use AuthLDAP within your application.
Downloads:
AuthLDAP (1676)
[...] AuthLDAP [...]
Hi,
Am getting the following error when configuring for Active Directory:
Error looking up DN for coolvixs: Success
My configs as follows:
$config['ldap_uri'] = array(‘ldap://example.com:389/’);
$config['use_tls'] = false; // Using SSL above, don’t use TLS with it
$config['search_base'] = ‘DC=example,DC=com’;
$config['user_search_base'] = ”;
$config['group_search_base'] = ”;
$config['user_object_class'] = ‘user’;
$config['group_object_class'] = ‘group’;
$config['user_search_filter'] = ”;
$config['group_search_filter'] = ”;
$config['login_attribute'] = ‘sAMAccountName’;
$config['schema_type'] = ‘ad’; // Could also use rfc2307bis
$config['proxy_user'] = ‘CN=Admin,CN=Users,DC=staff,DC=example,DC=com
$config['proxy_pass'] = ‘xxxxxx’;
$config['roles'] = array(1 => ‘User’,
3 => ‘Power User’,
5 => ‘Administrator’);
$config['auditlog'] = ‘application/logs/audit.log’;
Would be grateful if you could advise where am going wrong…
Thanks in advance
Hello.
I would like to ask your help.
can you write down step by step to install this in CI.
TQ.
Thanks a lot for this script ! I’ll test it !
Thanks for the great plugin. I have updated to the newer version and now I’m getting this error:
Message: ldap_connect() [function.ldap-connect]: Could not create session handle: Bad parameter to an ldap routine
im succes to login, but i want to know my uid_number and gid_number, can u help me
libraries/AuthLDAP.php line 193 – uses ldapconn() as a function when it’s a variable; need to drop the ()
controlllers/auth.php refers to ‘authldap.php’ when it should be ‘AuthLDAP.php’; I’m guessing you are using a case insensitive filesystem/OS.