OTP : 2FA Authentication

Improve : tighten the security + cosmetic
set double authentication : create, send link, usable with Google Authenticator and FreeOTP

1. OTP : prevent direct access without going throught the 2FA mechanism
2. Go back to the url where you were disconnected
3. Cosmetic
This commit is contained in:
sparkyx 2025-08-03 16:47:38 +02:00
parent 4bb0a46e6b
commit 4cee79c1f2
31 changed files with 1867 additions and 270 deletions

View file

@ -380,14 +380,13 @@ define ("VATCHECK_URL","https://ec.europa.eu/taxation_customs/vies/rest-api/");
function noalyss_class_autoloader($class)
{
$class = strtolower($class);
foreach (array("class","lib","database") as $path) {
if ( file_exists(NOALYSS_INCLUDE.'/'.$path.'/'.$class.'.class.php')) {
require_once NOALYSS_INCLUDE.'/'.$path.'/'.$class.'.class.php';
return;
}
}
$aClass = array(
"database" => "class/database.class.php",
"acc_detail" => "class/acc_operation.class.php",
@ -410,7 +409,8 @@ function noalyss_class_autoloader($class)
'noalyss\dbg'=>"lib/dbg.php",
'noalyss\file_cache'=>"lib/file_cache.class.php",
"pdfland"=>"class/pdf_land.class.php",
"noalyss\widget\widget"=>"widget/widget.php"
"noalyss\widget\widget"=>"widget/widget.php",
"noalyss\otp"=>"lib/otp.class.php"
);
if (isset ($aClass[$class])) {
require_once NOALYSS_INCLUDE . "/" . $aClass[$class];
@ -419,3 +419,5 @@ function noalyss_class_autoloader($class)
}
spl_autoload_register('\noalyss_class_autoloader', true);
require_once NOALYSS_BASE.'/vendor/autoload.php';