- 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:
Paolo
2019-03-12 11:33:01 +01:00
parent abf766ce51
commit aefd210273
13 changed files with 792 additions and 90 deletions
+21 -13
View File
@@ -11,14 +11,14 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
| and translated in the language files.
|
*/
define('FHC_SUCCESS', 0); // General Success Message
define('FHC_ERROR', 1); // General Error Message
define('FHC_MODEL_ERROR', 2); // Model Error
define('FHC_DB_ERROR', 3); // Database Error
define('FHC_NODBTABLE', 4); // No DB-Table is set
define('FHC_NORIGHT', 5); // No rights
define('FHC_INVALIDID', 6); // Invalid or no ID (key)
define('FHC_NOPK', 7); // No primary key
define('FHC_SUCCESS', 0); // General Success Message
define('FHC_ERROR', 1); // General Error Message
define('FHC_MODEL_ERROR', 2); // Model Error
define('FHC_DB_ERROR', 3); // Database Error
define('FHC_NODBTABLE', 4); // No DB-Table is set
define('FHC_NORIGHT', 5); // No rights
define('FHC_INVALIDID', 6); // Invalid or no ID (key)
define('FHC_NOPK', 7); // No primary key
/*
|--------------------------------------------------------------------------
@@ -60,11 +60,19 @@ define('EXIT_AUTO_MAX', 2000); // highest automatically-assigned error code
| Authentication constants
|--------------------------------------------------------------------------
*/
// Authentication methods
define('AUTH_SESSION', 'session');
define('AUTH_LDAP', 'ldap');
define('AUTH_DB', 'database');
define('AUTH_SSO', 'sso');
// Foreign authentication methods
define('AUTH_HBALDAP', 'httpBasicAuthLDAP');
define('AUTH_BT', 'bewerbung');
// Login methods
define('AUTH_LDAP', 'ldap');
define('AUTH_DB', 'database');
define('AUTH_SSO', 'sso');
// Authentication return codes
define('AUTH_SUCCESS', 0);
define('AUTH_NOT_AUTHENTICATED', 1);
define('AUTH_INVALID_CREDENTIALS', 2);
/*
|--------------------------------------------------------------------------