|
|
|
@ -1,8 +1,34 @@
|
|
|
|
|
<?php |
|
|
|
|
/** |
|
|
|
|
* CodeIgniter-Aauth |
|
|
|
|
* |
|
|
|
|
* Aauth is a User Authorization Library for CodeIgniter 4.x, which aims to make |
|
|
|
|
* easy some essential jobs such as login, permissions and access operations. |
|
|
|
|
* Despite ease of use, it has also very advanced features like groupping, |
|
|
|
|
* access management, public access etc.. |
|
|
|
|
* |
|
|
|
|
* @package CodeIgniter-Aauth |
|
|
|
|
* @author Magefly Team |
|
|
|
|
* @author Jacob Tomlinson |
|
|
|
|
* @author Tim Swagger (Renowne, LLC) <tim@renowne.com> |
|
|
|
|
* @author Raphael Jackstadt <info@rejack.de> |
|
|
|
|
* @copyright 2014-2017 Emre Akay |
|
|
|
|
* @copyright 2018 Magefly |
|
|
|
|
* @license https://opensource.org/licenses/MIT MIT License |
|
|
|
|
* @link https://github.com/magefly/CodeIgniter-Aauth |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
namespace Config; |
|
|
|
|
|
|
|
|
|
use CodeIgniter\Config\BaseConfig; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Aauth Config |
|
|
|
|
* |
|
|
|
|
* @package CodeIgniter-Aauth |
|
|
|
|
* |
|
|
|
|
* phpcs:disable Squiz.Commenting.VariableComment |
|
|
|
|
*/ |
|
|
|
|
class Aauth extends BaseConfig |
|
|
|
|
{ |
|
|
|
|
/* |
|
|
|
@ -29,7 +55,6 @@ class Aauth extends BaseConfig
|
|
|
|
|
| |
|
|
|
|
| Redirect path to TOTP Verification page |
|
|
|
|
| (default: '/account/twofactor_verification') |
|
|
|
|
| |
|
|
|
|
*/ |
|
|
|
|
public $linkNoPermission = false; |
|
|
|
|
public $linkResetPassword = '/account/reset_password'; |
|
|
|
@ -50,11 +75,10 @@ class Aauth extends BaseConfig
|
|
|
|
|
| |
|
|
|
|
| Additional valid chars for username. Non alphanumeric characters that are |
|
|
|
|
| allowed by default |
|
|
|
|
| (default: array()) |
|
|
|
|
| |
|
|
|
|
| (default: []) |
|
|
|
|
*/ |
|
|
|
|
public $userVerification = false; |
|
|
|
|
public $userAdditionalChars = array(); |
|
|
|
|
public $userAdditionalChars = []; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|-------------------------------------------------------------------------- |
|
|
|
@ -81,13 +105,12 @@ class Aauth extends BaseConfig
|
|
|
|
|
| |
|
|
|
|
| password_hash options array |
|
|
|
|
| for details see http://php.net/manual/en/function.password-hash.php |
|
|
|
|
| (default: array()) |
|
|
|
|
| |
|
|
|
|
| (default: []) |
|
|
|
|
*/ |
|
|
|
|
public $passwordMin = 8; |
|
|
|
|
public $passwordMax = 32; |
|
|
|
|
public $passwordHashAlgo = PASSWORD_DEFAULT; |
|
|
|
|
public $passwordHashOptions = array(); |
|
|
|
|
public $passwordHashOptions = []; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|-------------------------------------------------------------------------- |
|
|
|
@ -126,7 +149,6 @@ class Aauth extends BaseConfig
|
|
|
|
|
| |
|
|
|
|
| Enables removing login attempt after successful login |
|
|
|
|
| (default: true) |
|
|
|
|
| |
|
|
|
|
*/ |
|
|
|
|
public $loginRemember = '+14 days'; |
|
|
|
|
public $loginUseUsername = false; |
|
|
|
@ -155,12 +177,11 @@ class Aauth extends BaseConfig
|
|
|
|
|
| 'emailConfig' |
|
|
|
|
| |
|
|
|
|
| Array of Config for CI's Email Library |
|
|
|
|
| (default: false) |
|
|
|
|
| |
|
|
|
|
| (default: []) |
|
|
|
|
*/ |
|
|
|
|
public $emailFrom = 'admin@example.com'; |
|
|
|
|
public $emailFrom = 'sys@xpresspaper.eu'; |
|
|
|
|
public $emailFromName = 'Aauth v3'; |
|
|
|
|
public $emailConfig = false; |
|
|
|
|
public $emailConfig = []; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|-------------------------------------------------------------------------- |
|
|
|
@ -186,7 +207,6 @@ class Aauth extends BaseConfig
|
|
|
|
|
| |
|
|
|
|
| TOTP required if uses has TOTP secret on login() |
|
|
|
|
| (default: false) |
|
|
|
|
| |
|
|
|
|
*/ |
|
|
|
|
public $totpEnabled = false; |
|
|
|
|
public $totpOnIpChange = false; |
|
|
|
@ -217,7 +237,6 @@ class Aauth extends BaseConfig
|
|
|
|
|
| |
|
|
|
|
| The reCAPTCHA secretKey |
|
|
|
|
| (default: '') |
|
|
|
|
| |
|
|
|
|
*/ |
|
|
|
|
public $recaptchaEnabled = false; |
|
|
|
|
public $recaptchaLoginAttempts = 6; |
|
|
|
@ -243,7 +262,6 @@ class Aauth extends BaseConfig
|
|
|
|
|
| |
|
|
|
|
| Name of Public group , people who not logged in |
|
|
|
|
| (default: 'public') |
|
|
|
|
| |
|
|
|
|
*/ |
|
|
|
|
public $adminGroup = 'admin'; |
|
|
|
|
public $defaultGroup = 'default'; |
|
|
|
@ -308,7 +326,6 @@ class Aauth extends BaseConfig
|
|
|
|
|
| |
|
|
|
|
| The table which contains permissions for groups |
|
|
|
|
| (default: 'aauth_perm_to_group') |
|
|
|
|
| |
|
|
|
|
*/ |
|
|
|
|
public $dbProfile = 'default'; |
|
|
|
|
public $dbTableUsers = 'aauth_users'; |
|
|
|
@ -321,5 +338,4 @@ class Aauth extends BaseConfig
|
|
|
|
|
public $dbTablePerms = 'aauth_perms'; |
|
|
|
|
public $dbTablePermToUser = 'aauth_perm_to_user'; |
|
|
|
|
public $dbTablePermToGroup = 'aauth_perm_to_group'; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|