Gestito login con token jwt
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
NODE_ENV=development
|
||||
|
||||
LOGIN_JWT=true
|
||||
AZIENDA=integry
|
||||
ENABLED_PROFILES=
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath(false);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
include_once "config.php";
|
||||
|
||||
if (!isset($_GET["render"])) {
|
||||
require_once "include_login.php";
|
||||
}
|
||||
include_once "config.php";
|
||||
(new AllegatiAjax())->checkAjaxRequests();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
(new BlacklistArtClie())->checkAjaxRequests();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -4,6 +4,7 @@ class ErrorHandler {
|
||||
const EMSCONNECT = 0;
|
||||
const EMSHTTP = 1;
|
||||
const EMSHTTP400 = 2;
|
||||
const EMSHTTP401 = 401;
|
||||
const EMSPARSE = 3;
|
||||
const EMSNOMESSAGE = 4;
|
||||
const UNEXPECTED_AJAX_METHOD = 5;
|
||||
@@ -44,12 +45,15 @@ class ErrorHandler {
|
||||
|
||||
} else if ($errorCode === self::EMSHTTP) {
|
||||
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p3}</b></span><hr class='mt-0 mb-10'/>" : "")
|
||||
. "La chiamata al servizio ha restituito l'errore http <u>" . blankIfNull($p1) . "</u>" . (!is_null($p2) ? "<div class='mt-10 text-muted text-monospace small'>{$p2}</div>" : "");
|
||||
. "La chiamata al servizio ha restituito l'errore http <u>" . blankIfNull($p1) . "</u>"
|
||||
. (!is_null($p2) ? "<div class='mt-10 text-muted text-monospace small'>{$p2}</div>" : "");
|
||||
|
||||
} else if ($errorCode === self::EMSHTTP400) {
|
||||
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p1}</b></span><hr class='mt-0 mb-10'/>" : "")
|
||||
. "La chiamata al servizio ha restituito l'errore http <u>400</u> (Bad Request)" . (!is_null($p2) ? "<div class='mt-10 text-muted text-monospace small'>{$p2}</div>" : "");
|
||||
|
||||
. "La chiamata al servizio ha restituito l'errore http <u>400</u> (Bad Request)"
|
||||
. (!is_null($p2) ? "<div class='mt-10 text-muted text-monospace small'>{$p2}</div>" : "");
|
||||
} else if ($errorCode === self::EMSHTTP401) {
|
||||
return $p2;
|
||||
} else if ($errorCode === self::EMSHTTP550) {
|
||||
return "<span class='text-monospace'>Licenza <b>non valida</b></span>";
|
||||
|
||||
@@ -57,7 +61,8 @@ class ErrorHandler {
|
||||
return "<span class='text-monospace'>Application name non valorizzato</span>";
|
||||
|
||||
} else if ($errorCode === self::EMSPARSE) {
|
||||
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p1}</b></span><hr class='mt-0 mb-10'/>" : "") .
|
||||
return (!is_null($p1) ? "<span class='text-monospace'>Servizio <b>{$p1}</b></span><hr class='mt-0 mb-10'/>" : "")
|
||||
.
|
||||
"Parse della risposta del servizio <b>" . blankIfNull($p1) . "</b> fallita";
|
||||
|
||||
} else if ($errorCode === self::EMSNOMESSAGE) {
|
||||
@@ -143,7 +148,8 @@ class ErrorHandler {
|
||||
if (\GestSetup::isGestSetupObject($GestSetup)) {
|
||||
$description = $GestSetup->getDescription();
|
||||
|
||||
$message = "<span class='small font-italic text-uppercase'>" . $GestSetup->getGestName() . " > " . $GestSetup->getSection() . " > <b>" . $GestSetup->getKeySection() . "</b></span>";
|
||||
$message = "<span class='small font-italic text-uppercase'>" . $GestSetup->getGestName() . " > "
|
||||
. $GestSetup->getSection() . " > <b>" . $GestSetup->getKeySection() . "</b></span>";
|
||||
if (!is_null($description)) {
|
||||
$message .= " <span class='text-xs opacity-90 font-italic'>(" . ucfirst($description) . ")</span>";
|
||||
}
|
||||
@@ -155,7 +161,9 @@ class ErrorHandler {
|
||||
}
|
||||
|
||||
public static function get_title($errorCode, $p1 = null, $p2 = null, $p3 = null) {
|
||||
if (in_array($errorCode, array(self::EMSHTTP400, self::EMSHTTP, self::EMSPARSE, self::EMSNOMESSAGE, self::EMSCONNECT))) {
|
||||
if (in_array($errorCode, array(
|
||||
self::EMSHTTP400, self::EMSHTTP, self::EMSPARSE, self::EMSNOMESSAGE, self::EMSCONNECT
|
||||
))) {
|
||||
return "Servizio non disponibile";
|
||||
|
||||
} else if (in_array($errorCode, array(self::UNEXPECTED_AJAX_METHOD, self::UNEXPECTED_METHOD))) {
|
||||
@@ -173,7 +181,11 @@ class ErrorHandler {
|
||||
} else if (in_array($errorCode, array(self::UNAUTHORIZED_USER))) {
|
||||
return "Utente non autorizzato";
|
||||
|
||||
} else if (in_array($errorCode, array(self::APIXU_MISSING_INVALID_KEY, self::APIXU_MISSING_Q, self::APIXU_INVALID_URL, self::APIXU_LOCATION_NOT_FOUND, self::APIXU_DAY_UNAVAILABLE, self::APIXU_INVALID_KEY, self::APIXU_EXCEED_QUOTA, self::APIXU_DISABLED_KEY, self::APIXU_INTERNAL_ERROR))) {
|
||||
} else if (in_array($errorCode, array(
|
||||
self::APIXU_MISSING_INVALID_KEY, self::APIXU_MISSING_Q, self::APIXU_INVALID_URL,
|
||||
self::APIXU_LOCATION_NOT_FOUND, self::APIXU_DAY_UNAVAILABLE, self::APIXU_INVALID_KEY,
|
||||
self::APIXU_EXCEED_QUOTA, self::APIXU_DISABLED_KEY, self::APIXU_INTERNAL_ERROR
|
||||
))) {
|
||||
return "Servizio meteo non disponibile";
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -13,6 +13,7 @@ class IMSApi {
|
||||
private $endpoint = null;
|
||||
private $profileDB = null;
|
||||
private $queryParams = array();
|
||||
private $accessToken = null;
|
||||
private $authUsername = null;
|
||||
private $authPassword = null;
|
||||
private $anonymousAuth = false;
|
||||
@@ -68,6 +69,11 @@ class IMSApi {
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function accessToken($value) {
|
||||
$this->accessToken = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function authUsername($value) {
|
||||
$this->authUsername = $value;
|
||||
return $this;
|
||||
@@ -107,20 +113,26 @@ class IMSApi {
|
||||
|
||||
if ($type == Format::strftimeYMD) {
|
||||
$type = Format::strtotimeYMD;
|
||||
} else if ($type == Format::strftimeYMDHMS) {
|
||||
} else {
|
||||
if ($type == Format::strftimeYMDHMS) {
|
||||
$type = Format::strtotimeYMDHMS;
|
||||
} else if ($type == Format::strftimeSlashedYMD) {
|
||||
} else {
|
||||
if ($type == Format::strftimeSlashedYMD) {
|
||||
$type = "Y/m/d";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$value = $dateTime->format($type);
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
} else if ($type == \Format::latLng1) {
|
||||
} else {
|
||||
if ($type == \Format::latLng1) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->queryParams[$key] = $value;
|
||||
return $this;
|
||||
@@ -215,13 +227,15 @@ class IMSApi {
|
||||
if (is_array($this->body)) {
|
||||
if ($this->contentType == Rest::FORM) {
|
||||
return http_build_query($this->body);
|
||||
} else if ($this->contentType == Rest::MULTIPART) {
|
||||
} else {
|
||||
if ($this->contentType == Rest::MULTIPART) {
|
||||
|
||||
return $this->body;
|
||||
} else {
|
||||
return Utility::json_encode($this->body);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->body;
|
||||
|
||||
} else { // SET
|
||||
@@ -253,13 +267,19 @@ class IMSApi {
|
||||
$profileDb
|
||||
= !is_null($this->profileDB) ? $this->profileDB : (isset($GLOBALS["profileDB"]) ? $GLOBALS["profileDB"] : null);
|
||||
return array("username" => $profileDb, "password" => $profileDb);
|
||||
} else if (!is_null($this->authUsername) && !is_null($this->authPassword)) {
|
||||
} else {
|
||||
if (!is_null($this->authUsername) && !is_null($this->authPassword)) {
|
||||
return array("username" => $this->authUsername, "password" => $this->authPassword);
|
||||
} else if (!is_null($this->authUsername)) {
|
||||
} else {
|
||||
if (!is_null($this->authUsername)) {
|
||||
return array("username" => $this->authUsername);
|
||||
} else if (\User::is_authenticated() && isset($_SESSION["password"])) {
|
||||
} else {
|
||||
if (\User::is_authenticated() && isset($_SESSION["password"])) {
|
||||
return array("username" => $_SESSION["username"], "password" => $_SESSION["password"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -296,7 +316,21 @@ class IMSApi {
|
||||
|
||||
$Rest->header("X-App-Token", self::X_APP_TOKEN);
|
||||
|
||||
if (LOGIN_JWT) {
|
||||
if (!$this->anonymousAuth) {
|
||||
if (is_null($this->accessToken)) {
|
||||
$this->accessToken = array_get($_SESSION, "accessToken");
|
||||
}
|
||||
|
||||
if (!$this->accessToken) {
|
||||
return $Ret->set_error(sprintf("Access token mancante al servizio <i>%s</i>", $this->serviceName));
|
||||
}
|
||||
|
||||
$Rest->header("Authorization", "Bearer $this->accessToken");
|
||||
}
|
||||
} else {
|
||||
$credentials = $this->get_authCredentials();
|
||||
|
||||
if (!is_null($credentials)) {
|
||||
if (array_get($credentials, "username")) {
|
||||
$Rest->authUsername($credentials["username"]);
|
||||
@@ -309,6 +343,7 @@ class IMSApi {
|
||||
return $Ret->set_error("Credenziali di autenticazione al servizio <i>" . $this->serviceName
|
||||
. "</i> non valide");
|
||||
}
|
||||
}
|
||||
|
||||
/********************************** HERE IT IS PERFORMED THE REST APIs CALL *************************************/
|
||||
$Ret = $Rest->send();
|
||||
@@ -327,6 +362,44 @@ class IMSApi {
|
||||
if ($Ret->is_OK()) {
|
||||
@$Ret->set_Response(new IMSApi\Response($retData));
|
||||
}
|
||||
} else {
|
||||
if (!\Utility\Str::contains("auth/refresh", $this->serviceName)
|
||||
&& $Ret->get_errorCode() == ErrorHandler::EMSHTTP401
|
||||
&& isset($_SESSION["refreshToken"])
|
||||
&& isset($_SESSION["deviceId"])) {
|
||||
$imsApi = new IMSApi();
|
||||
|
||||
$ret = $imsApi
|
||||
->post("auth/refresh")
|
||||
->anonymousAuth()
|
||||
->profileDB($this->profileDB)
|
||||
->body(array(
|
||||
"refreshToken" => $_SESSION["refreshToken"],
|
||||
"deviceId" => $_SESSION["deviceId"],
|
||||
))
|
||||
->send();
|
||||
|
||||
if ($ret->is_KO()) {
|
||||
unset($_SESSION["accessToken"]);
|
||||
User::logout();
|
||||
|
||||
// non posso impostare alcun header perchè è già partito l'output con echo ┑( ̄Д  ̄)┍
|
||||
echo "<script type='text/javascript'>window.location.href = 'login.php';</script>";
|
||||
|
||||
return Ret::error();
|
||||
}
|
||||
|
||||
$data = $ret->getDto();
|
||||
|
||||
$this->accessToken = $data["accessToken"];
|
||||
|
||||
$_SESSION["accessToken"] = $data["accessToken"];
|
||||
$_SESSION["refreshToken"] = $data["refreshToken"];
|
||||
$_SESSION["expiryDate"] = $data["expiryDate"];
|
||||
$_SESSION["expiresIn"] = $data["expireIn"];
|
||||
|
||||
return self::send();
|
||||
}
|
||||
}
|
||||
|
||||
return $Ret;
|
||||
|
||||
@@ -382,6 +382,9 @@ class Rest {
|
||||
} else if ($httpCode == 400) {
|
||||
$errorLog = "400";
|
||||
$Ret->set_errorCode(ErrorHandler::EMSHTTP400, $this->service, array_get($retData, "0.errorMessage"));
|
||||
} else if ($httpCode == 401) {
|
||||
$errorLog = "401";
|
||||
$Ret->set_errorCode(ErrorHandler::EMSHTTP401, $this->service, array_get($retData, "0.errorMessage"));
|
||||
} else if ($httpCode == 550) {
|
||||
$errorLog = "550";
|
||||
$Ret->set_errorCode(ErrorHandler::EMSHTTP550, $this->service);
|
||||
|
||||
@@ -289,6 +289,18 @@ class User {
|
||||
|
||||
public static function logout() {
|
||||
getSession();
|
||||
|
||||
if (LOGIN_JWT && isset($_SESSION["accessToken"])) {
|
||||
$imsApi = new IMSApi();
|
||||
|
||||
$imsApi
|
||||
->put("auth/logout")
|
||||
->body(array(
|
||||
"deviceId" => $_SESSION["deviceId"]
|
||||
))
|
||||
->send();
|
||||
}
|
||||
|
||||
//operazioni e controlli per effettura il logout dell'utente/agente
|
||||
if (isset($_SESSION["login"])) {
|
||||
$_SESSION["login"] = false;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -20,6 +20,8 @@ $dotenv->safeLoad();
|
||||
//$dotenv->required(array("AZIENDA", "SERVICES_BASE_URL"))->notEmpty();
|
||||
//$dotenv->required("APP_ENV")->allowedValues(array("DEV", "PROD"))->notEmpty();
|
||||
|
||||
define("LOGIN_JWT", array_key_exists("LOGIN_JWT", $_ENV) && $_ENV["LOGIN_JWT"] == "true");
|
||||
|
||||
try {
|
||||
$cacheManager = \phpFastCache\CacheManager::getInstance("sqlite");
|
||||
} catch (\phpFastCache\Exceptions\phpFastCacheDriverCheckException $e) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
|
||||
if (isset($_GET["arr_codMart"])) {
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath(false);
|
||||
|
||||
@@ -360,12 +360,18 @@ function parse_size($size) {
|
||||
}
|
||||
|
||||
function is_logged() {
|
||||
if (LOGIN_JWT) {
|
||||
$arr_fields = array("accessToken", "refreshToken");
|
||||
} else {
|
||||
$arr_fields = array("username", "password", "cod_mdep", "user_code", "fullname", "gruppo");
|
||||
}
|
||||
|
||||
foreach ($arr_fields as $field) {
|
||||
if (!array_key_exists($field, $_SESSION)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,15 +14,25 @@ class Login {
|
||||
getSession();
|
||||
}
|
||||
|
||||
$_SESSION["username"] = $userData["user_name"];
|
||||
if (LOGIN_JWT) {
|
||||
$_SESSION["accessToken"] = $userData["accessToken"];
|
||||
$_SESSION["refreshToken"] = $userData["refreshToken"];
|
||||
$_SESSION["expiryDate"] = $userData["expiryDate"];
|
||||
$_SESSION["expiresIn"] = $userData["expireIn"];
|
||||
$_SESSION["deviceId"] = $userData["deviceId"];
|
||||
} else {
|
||||
$_SESSION["password"] = $userData["password"];
|
||||
}
|
||||
|
||||
$_SESSION["username"] = $userData["user_name"];
|
||||
$_SESSION["cod_mdep"] = $userData["cod_mdep"];
|
||||
$_SESSION["user_code"] = $userData["user_code"];
|
||||
$_SESSION["fullname"] = $userData["full_name"];
|
||||
$_SESSION["cod_lang"] = isset($userData["cod_lang"]) ? $userData["cod_lang"] : "IT";
|
||||
$_SESSION["profileDB"] = $userData["profile_db"];
|
||||
$_SESSION["profileDB"] = $GLOBALS["profileDB"];
|
||||
$_SESSION["gruppo"] = $userData["key_group"];
|
||||
$_SESSION["sqldriver"] = null;
|
||||
|
||||
$_SESSION["login"] = "OK";
|
||||
}
|
||||
|
||||
@@ -75,7 +85,13 @@ class Login {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function authenticate($userName, $password, $md5User, $azienda) {
|
||||
public static function authenticate($data) {
|
||||
$userName = array_get($data, "username");
|
||||
$password = array_get($data, "password");
|
||||
$md5User = array_get($data, "md5_user");
|
||||
$azienda = array_get($data, "azienda");
|
||||
$deviceId = array_get($data, "deviceId");
|
||||
|
||||
$Ret = self::get_endpointHost();
|
||||
if ($Ret->is_OK()) {
|
||||
$endpoint = $Ret->get_string();
|
||||
@@ -90,34 +106,76 @@ class Login {
|
||||
}
|
||||
}*/
|
||||
|
||||
$IMSApi = new IMSApi;
|
||||
$IMSApi->post("loginWeb")
|
||||
$IMSApi = new IMSApi();
|
||||
|
||||
$IMSApi
|
||||
->anonymousAuth()
|
||||
->profileDB(is_null($azienda) ? "" : $azienda)
|
||||
->profileDB(is_null($azienda) ? "" : $azienda);
|
||||
|
||||
if (LOGIN_JWT) {
|
||||
$IMSApi
|
||||
->post("auth/login")
|
||||
->body(array(
|
||||
"username" => $userName,
|
||||
"password" => $password,
|
||||
"deviceId" => $deviceId,
|
||||
"md5User" => $md5User
|
||||
));
|
||||
} else {
|
||||
$IMSApi
|
||||
->post("loginWeb")
|
||||
->body(array(
|
||||
"profileDb" => is_null($azienda) ? "" : $azienda,
|
||||
"username" => $userName,
|
||||
"password" => $password,
|
||||
"md5User" => $md5User
|
||||
));
|
||||
}
|
||||
|
||||
if (!PVM::isDevClient()) {
|
||||
$IMSApi->endpoint($endpoint);
|
||||
}
|
||||
|
||||
$Ret = $IMSApi->send();
|
||||
|
||||
if ($Ret->is_OK()) {
|
||||
self::destroy_session();
|
||||
|
||||
$retData = $Ret->get_data();
|
||||
$Ret->set_data(null);
|
||||
if (isset($retData[0]["dto"])) {
|
||||
|
||||
$Ret->set_data();
|
||||
|
||||
if (isset($retData[0]["dto"])) {
|
||||
$user = $retData[0]["dto"];
|
||||
|
||||
if (LOGIN_JWT) {
|
||||
$user["deviceId"] = $deviceId;
|
||||
} else {
|
||||
$user["password"] = $password;
|
||||
}
|
||||
|
||||
if (!isset($user["username"])) {
|
||||
$imsApi = new IMSApi();
|
||||
|
||||
$ret = $imsApi
|
||||
->get("auth/me")
|
||||
->profileDB(is_null($azienda) ? "" : $azienda)
|
||||
->accessToken($user["accessToken"])
|
||||
->send();
|
||||
|
||||
if ($ret->is_KO()) {
|
||||
$ret->display();
|
||||
}
|
||||
|
||||
$user = array_merge(
|
||||
$user,
|
||||
$ret->getDto()
|
||||
);
|
||||
}
|
||||
|
||||
self::$_userData = $user;
|
||||
$GLOBALS["profileDB"] = $user["profile_db"];
|
||||
|
||||
$GLOBALS["profileDB"] = is_null($azienda) ? $user["profile_db"] : $azienda;
|
||||
|
||||
if (true) {
|
||||
self::fix_sessionUserPassword($md5User); // completamento $_SESSION["password"] per autenticazione con md5 da url
|
||||
@@ -132,15 +190,16 @@ class Login {
|
||||
// self::set_profileDB_cached($userName . $password . $md5User, $user["profile_db"]);
|
||||
self::set_sessionData($user);
|
||||
|
||||
$Ret->set_data(array(
|
||||
"username" => $user["user_name"],
|
||||
"fullname" => $user["full_name"],
|
||||
"profileDb" => $user["profile_db"],
|
||||
"endPoint" => Rest::get_endPointRemote()
|
||||
));
|
||||
// $Ret->set_data(array(
|
||||
// "username" => $user["user_name"],
|
||||
// "fullname" => $user["full_name"],
|
||||
// "profileDb" => $user["profile_db"],
|
||||
// "endPoint" => Rest::get_endPointRemote()
|
||||
// ));
|
||||
|
||||
if (!is_null(nullIfBlank($md5User))) {
|
||||
$idModuloRef = (isset($_GET["ref"]) && User::hasModulo($_GET["ref"])) ? $_GET["ref"] : null;
|
||||
$idModuloRef = (isset($_GET["ref"])
|
||||
&& User::hasModulo($_GET["ref"])) ? $_GET["ref"] : null;
|
||||
$params = array_get($_GET, "params");
|
||||
|
||||
if (!is_null($idModuloRef)) {
|
||||
@@ -273,7 +332,8 @@ class Login {
|
||||
if (!User::group_is(self::getGruppoValidatoriDefault(), User::AMMINISTRATORE_SISTEMA)) {
|
||||
|
||||
$GestSetup = new GestSetup;
|
||||
$verificaTokenAttiva = $GestSetup->section("LOGIN")->keySection("TOKEN_AUTHENTICATION")->defaultValue("N")->asBoolean()->get();
|
||||
$verificaTokenAttiva
|
||||
= $GestSetup->section("LOGIN")->keySection("TOKEN_AUTHENTICATION")->defaultValue("N")->asBoolean()->get();
|
||||
if ($verificaTokenAttiva) {
|
||||
$userName = $user["user_name"];
|
||||
$tokenId = self::getTokenClient();
|
||||
@@ -322,7 +382,8 @@ class Login {
|
||||
if (!is_null($tokenHash)) {
|
||||
$UrlBuilder = new \RemoteModuleUrl();
|
||||
$urlData = array("token_id" => $tokenId, "hash" => $tokenHash);
|
||||
$url = $UrlBuilder->module("login")->profileDB($profileDB)->data($urlData)->get_url();
|
||||
$url
|
||||
= $UrlBuilder->module("login")->profileDB($profileDB)->data($urlData)->get_url();
|
||||
|
||||
$Mailer = new PVM\Mailer;
|
||||
|
||||
@@ -333,11 +394,14 @@ class Login {
|
||||
$mailText .= "IP richiedente: <b>" . $ipRichiesta . "</b><br/>";
|
||||
|
||||
$uaparsed = Utility::parse_useragent($userAgent);
|
||||
$browser = !is_null($uaparsed["browser"]["full_desc"]) ? $uaparsed["browser"]["full_desc"] : null;
|
||||
$so = !is_null($uaparsed["operating_system"]["full_desc"]) ? $uaparsed["operating_system"]["full_desc"] : null;
|
||||
$browser
|
||||
= !is_null($uaparsed["browser"]["full_desc"]) ? $uaparsed["browser"]["full_desc"] : null;
|
||||
$so
|
||||
= !is_null($uaparsed["operating_system"]["full_desc"]) ? $uaparsed["operating_system"]["full_desc"] : null;
|
||||
|
||||
if (!is_null($uaparsed["device"]["full_desc"])) {
|
||||
$mailText .= "Dispositivo: <b>" . $uaparsed["device"]["full_desc"] . "</b><br/>";
|
||||
$mailText .= "Dispositivo: <b>" . $uaparsed["device"]["full_desc"]
|
||||
. "</b><br/>";
|
||||
}
|
||||
if (!is_null($browser)) {
|
||||
$mailText .= "Browser: <b>" . $browser . "</b><br/>";
|
||||
@@ -529,7 +593,8 @@ class Login {
|
||||
if (!self::is_clientAndApplicationServer()) {
|
||||
$profileDB = is_null($profileDB) ? self::get_azienda() : $profileDB;
|
||||
$azienda = self::get_aziendaMain($profileDB);
|
||||
$path_loginBg = str_replace(DIRECTORY_SEPARATOR, "/", AziendaUtils::getPathHome($azienda) . "login-bg" . DIRECTORY_SEPARATOR);
|
||||
$path_loginBg = str_replace(DIRECTORY_SEPARATOR, "/", AziendaUtils::getPathHome($azienda) . "login-bg"
|
||||
. DIRECTORY_SEPARATOR);
|
||||
if (\Utility\Str::ciEquals($azienda, "integry") && PVM::isDevClient()) {
|
||||
$path_loginBg .= "funnies/";
|
||||
}
|
||||
@@ -537,7 +602,8 @@ class Login {
|
||||
$arr_images = glob($path_loginBg . "*.{jpg,png}", GLOB_BRACE);
|
||||
}
|
||||
if (count($arr_images) == 0) {
|
||||
$arr_images[] = str_replace(DIRECTORY_SEPARATOR, "/", Controller::current_gestpath_images("teamwork-2600.jpg"));
|
||||
$arr_images[]
|
||||
= str_replace(DIRECTORY_SEPARATOR, "/", Controller::current_gestpath_images("teamwork-2600.jpg"));
|
||||
}
|
||||
}
|
||||
return $arr_images;
|
||||
|
||||
@@ -1,17 +1,27 @@
|
||||
<?php
|
||||
if (isset($_GET["login"]) || isset($_GET["md5_user"])) {
|
||||
$userName = $password = $md5User = "";
|
||||
$azienda = null;
|
||||
if (isset($_GET["md5_user"])) {
|
||||
$md5User = Utility::sanitize($_GET["md5_user"]);
|
||||
} else {
|
||||
$data = Utility::sanitizeB64JSON_parse($_GET["login"]);
|
||||
$userName = $data["username"];
|
||||
$password = $data["password"];
|
||||
$azienda = $data["azienda"];
|
||||
|
||||
if (isset($_GET["md5_user"])) {
|
||||
if (!is_array($data)) {
|
||||
$data = array();
|
||||
}
|
||||
|
||||
$LoginRet = Login::authenticate($userName, $password, $md5User, $azienda);
|
||||
$data["md5_user"] = Utility::sanitize($_GET["md5_user"]);
|
||||
}
|
||||
|
||||
// $userName = $password = $md5User = "";
|
||||
// $azienda = null;
|
||||
// if (isset($_GET["md5_user"])) {
|
||||
// $md5User = Utility::sanitize($_GET["md5_user"]);
|
||||
// } else {
|
||||
// $data = Utility::sanitizeB64JSON_parse($_GET["login"]);
|
||||
// $userName = $data["username"];
|
||||
// $password = $data["password"];
|
||||
// $azienda = $data["azienda"];
|
||||
// }
|
||||
|
||||
$LoginRet = Login::authenticate($data);
|
||||
if ($LoginRet->is_OK()) {
|
||||
$LoginRet->display();
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ foreach (Controller::get_css_files() as $asset) {
|
||||
|
||||
include "include/tag-head-include_css.php";
|
||||
|
||||
include "include/tag-importmap.php";
|
||||
|
||||
foreach (Controller::get_js_files() as $asset) {
|
||||
Utility::echoImportResourceTag($asset);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
$(function () {
|
||||
_login.signup.init();
|
||||
_signup.init();
|
||||
});
|
||||
|
||||
_login.signup = {
|
||||
_signup = {
|
||||
recaptchaToken: null,
|
||||
|
||||
init: function () {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import fpPromise from "@js/auth.js";
|
||||
|
||||
FontAwesomeConfig.autoReplaceSvg = false;
|
||||
|
||||
$(function () {
|
||||
@@ -210,15 +212,20 @@ const _login = {
|
||||
return $("#azienda").getValue();
|
||||
},
|
||||
|
||||
send_loginRequest: function () { // fare controllo preventivo che non siano vuoti
|
||||
send_loginRequest: async function () { // fare controllo preventivo che non siano vuoti
|
||||
const self = this;
|
||||
|
||||
const fp = await fpPromise;
|
||||
const result = await fp.get();
|
||||
|
||||
const d = $.Deferred();
|
||||
const $form = $("#form-signin");
|
||||
const $btSubmit = $form.find("button[type='submit']");
|
||||
const data = {
|
||||
username: $("#username").getValue(),
|
||||
password: $("#password").getValue(),
|
||||
azienda: self.get_azienda()
|
||||
deviceId: result.visitorId,
|
||||
azienda: self.get_azienda(),
|
||||
};
|
||||
|
||||
const ajax = new Ajax();
|
||||
@@ -400,3 +407,5 @@ const _bgCarousel = {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
window._login = _login;
|
||||
@@ -28,7 +28,8 @@ class LogDifferentUser {
|
||||
}
|
||||
$data = array_get($data, "data", array());
|
||||
$srcTerm = array_get($data, "term");
|
||||
$query = new \Query("SELECT user_name, ISNULL(full_name, user_name) AS full_name FROM stb_user WHERE flag_attivo = 'S' AND flag_extra_user = 'S' AND (user_name LIKE '%[term]%' OR full_name LIKE '%[term]%')");
|
||||
$query
|
||||
= new \Query("SELECT user_name, ISNULL(full_name, user_name) AS full_name FROM stb_user WHERE flag_attivo = 'S' AND flag_extra_user = 'S' AND (user_name LIKE '%[term]%' OR full_name LIKE '%[term]%')");
|
||||
$termArray = explode(" ", $srcTerm);
|
||||
$terms = implode("%", $termArray);
|
||||
$query->setVar("term", $terms);
|
||||
@@ -44,7 +45,8 @@ class LogDifferentUser {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$query = new \Query("SELECT user_name, dbo.sys_dcd_pss(password) AS password FROM stb_user WHERE user_name = '[username]'");
|
||||
$query
|
||||
= new \Query("SELECT user_name, dbo.sys_dcd_pss(password) AS password FROM stb_user WHERE user_name = '[username]'");
|
||||
$ret = $query
|
||||
->setVar("username", array_get($data, "user_name"))
|
||||
->toRet()
|
||||
@@ -55,9 +57,12 @@ class LogDifferentUser {
|
||||
return $ret;
|
||||
}
|
||||
$userData = $ret->get_data();
|
||||
$username = array_get($userData, "user_name");
|
||||
$password = array_get($userData, "password");
|
||||
$ret = Login::authenticate($username, $password, null, \User::get_current_profileDb());
|
||||
$ret = Login::authenticate(array(
|
||||
"username" => array_get($userData, "user_name"),
|
||||
"password" => array_get($userData, "password"),
|
||||
"azienda" => \User::get_current_profileDb(),
|
||||
"deviceId" => array_get($_SESSION, "deviceId")
|
||||
));
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath(false);
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
|
||||
if (!class_exists("GrigliaArttagcol")) {
|
||||
include Controller::current_gestpath_classes("GrigliaArttagcol.class.php");
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
5
public_html/js/auth.ts
Normal file
5
public_html/js/auth.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import FingerprintJS from "@fingerprintjs/fingerprintjs";
|
||||
|
||||
const fpPromise = FingerprintJS.load();
|
||||
|
||||
export default fpPromise;
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
|
||||
if (!class_exists("Messenger")) {
|
||||
include Controller::current_gestpath_classes("Messenger.class.php");
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
(new ModalMrpAjax())->checkAjaxRequests();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
(new ModalSelezioneArticoliAjax())->checkAjaxRequests();
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
|
||||
//include Controller::current_gestpath_include("ajax.php");
|
||||
(new NotificheAjax())->checkAjaxRequests();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
include_once "session.php";
|
||||
$session = getSession();
|
||||
include_once "functions.php";
|
||||
require_once "include_login.php";
|
||||
include_once "config.php";
|
||||
require_once "include_login.php";
|
||||
include_once "include/module.php";
|
||||
|
||||
include Controller::current_mainClasspath();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user