mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
- Renamed libraries/LDAPLib.php to libraries/AuthLDAPLib.php
- Removed constants LDAP_NO_USER_DN and LDAP_TOO_MANY_USER_DN from config/constants.php - Added config entry timeout to config/ldap.php - Changed private method libraries/AuthLib->_checkLDAPAuthentication to use libraries/AuthLDAPLib->checkUsernamePassword - Changed AuthLDAPLib to have only one public method called checkUsernamePassword that makes use of the other private methods to check if a username and password are valid on many LDAP servers
This commit is contained in:
@@ -57,14 +57,6 @@ define('AUTH_SUCCESS', 0);
|
||||
define('AUTH_NOT_AUTHENTICATED', 1);
|
||||
define('AUTH_INVALID_CREDENTIALS', 2);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| LDAP constants
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
define('LDAP_NO_USER_DN', 10);
|
||||
define('LDAP_TOO_MANY_USER_DN', 11);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Language constants
|
||||
|
||||
@@ -17,7 +17,8 @@ if (defined('LDAP_SERVER')) // 1st LDAP server
|
||||
'basedn' => LDAP_BASE_DN,
|
||||
'username' => LDAP_BIND_USER,
|
||||
'password' => LDAP_BIND_PASSWORD,
|
||||
'usf' => LDAP_USER_SEARCH_FILTER
|
||||
'usf' => LDAP_USER_SEARCH_FILTER,
|
||||
'timeout' => 1
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,7 +31,8 @@ if (defined('LDAP2_SERVER')) // 2nd LDAP server
|
||||
'basedn' => LDAP2_BASE_DN,
|
||||
'username' => LDAP2_BIND_USER,
|
||||
'password' => LDAP2_BIND_PASSWORD,
|
||||
'usf' => LDAP2_USER_SEARCH_FILTER
|
||||
'usf' => LDAP2_USER_SEARCH_FILTER,
|
||||
'timeout' => 1
|
||||
);
|
||||
}
|
||||
|
||||
@@ -45,7 +47,8 @@ if (defined('LDAP_SERVER')) // 1st LDAP server
|
||||
'basedn' => LDAP_BASE_DN,
|
||||
'username' => LDAP_BIND_USER,
|
||||
'password' => LDAP_BIND_PASSWORD,
|
||||
'usf' => LDAP_USER_SEARCH_FILTER
|
||||
'usf' => LDAP_USER_SEARCH_FILTER,
|
||||
'timeout' => 1
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,6 +61,8 @@ if (defined('LDAP2_SERVER')) // 2nd LDAP server
|
||||
'basedn' => LDAP2_BASE_DN,
|
||||
'username' => LDAP2_BIND_USER,
|
||||
'password' => LDAP2_BIND_PASSWORD,
|
||||
'usf' => LDAP2_USER_SEARCH_FILTER
|
||||
'usf' => LDAP2_USER_SEARCH_FILTER,
|
||||
'timeout' => 1
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user