mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
- Added new configuration file auth.php for authentication
- Added new configuration file ldap.php for LDAP connection - Added new controller system/Login to manage logins - Added new controller system/Logout to manage logout - Added new core model LDAP_Model to manage LDAP connections - Added new constants in config/constants for authentication - Added new function getCode to hlp_message_helper - Now core/Auth_Controller loads the AuthLib as first step - Now PermissionLib does NOT load anymore the AuthLib - Removed old logic from PermissionLib - Now function getAuthUID (hlp_authentication_helper) does not load anymore the AuthLib - Now REST_Controller loads hlp_message_helper and hlp_common_helper - core/APIv1_Controller does NOT load anymore hlp_message_helper and hlp_common_helper - Added new constants to AuthLib - AuthLib constructor now accept a parameter to enable the authentication immediatly (default) - AuthLib loads configuration file auth.php and Person_model by default - Added public methods getAuthObj and logout to AuthLib - Renamed CheckUserAuthByUsernamePassword to checkUserAuthByUsernamePassword, CheckUserAuthByCode to checkUserAuthByCode and CheckUserAuthByCodeEmail to checkUserAuthByCodeEmail in AuthLib - Added private methods _createAuthObj, _isLogged, _showInvalidAuthentication, _showError, _checkBTAuthentication, _checkHBALDAPAuthentication, _checkLDAPAuthentication, _checkForeignAuthentication, _storeAuthObj and _authenticate to AuthLib
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
defined('LDAP_SERVER') OR require_once './config/system.config.inc.php'; // LDAP configs
|
||||
|
||||
$ldap_active_group = 'development';
|
||||
|
||||
$ldap['development'] = array(); // development LDAP configs
|
||||
|
||||
if (defined('LDAP_SERVER')) // 1st LDAP server
|
||||
{
|
||||
$ldap['development'][] = array(
|
||||
'server' => LDAP_SERVER,
|
||||
'port' => LDAP_PORT,
|
||||
'starttls' => LDAP_STARTTLS,
|
||||
'basedn' => LDAP_BASE_DN,
|
||||
'username' => LDAP_BIND_USER,
|
||||
'password' => LDAP_BIND_PASSWORD,
|
||||
'usf' => LDAP_USER_SEARCH_FILTER
|
||||
);
|
||||
}
|
||||
|
||||
if (defined('LDAP2_SERVER')) // 2nd LDAP server
|
||||
{
|
||||
$ldap['development'][] = array(
|
||||
'server' => LDAP2_SERVER,
|
||||
'port' => LDAP2_PORT,
|
||||
'starttls' => LDAP2_STARTTLS,
|
||||
'basedn' => LDAP2_BASE_DN,
|
||||
'username' => LDAP2_BIND_USER,
|
||||
'password' => LDAP2_BIND_PASSWORD,
|
||||
'usf' => LDAP2_USER_SEARCH_FILTER
|
||||
);
|
||||
}
|
||||
|
||||
$ldap['production'] = array(); // Live LDAP configs
|
||||
|
||||
if (defined('LDAP_SERVER')) // 1st LDAP server
|
||||
{
|
||||
$ldap['production'][] = array(
|
||||
'server' => LDAP_SERVER,
|
||||
'port' => LDAP_PORT,
|
||||
'starttls' => LDAP_STARTTLS,
|
||||
'basedn' => LDAP_BASE_DN,
|
||||
'username' => LDAP_BIND_USER,
|
||||
'password' => LDAP_BIND_PASSWORD,
|
||||
'usf' => LDAP_USER_SEARCH_FILTER
|
||||
);
|
||||
}
|
||||
|
||||
if (defined('LDAP2_SERVER')) // 2nd LDAP server
|
||||
{
|
||||
$ldap['production'][] = array(
|
||||
'server' => LDAP2_SERVER,
|
||||
'port' => LDAP2_PORT,
|
||||
'starttls' => LDAP2_STARTTLS,
|
||||
'basedn' => LDAP2_BASE_DN,
|
||||
'username' => LDAP2_BIND_USER,
|
||||
'password' => LDAP2_BIND_PASSWORD,
|
||||
'usf' => LDAP2_USER_SEARCH_FILTER
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user