diff --git a/Contestation/Demandereconnaissancefaciale.php b/Contestation/Demandereconnaissancefaciale.php index 5ef8d32..62d133e 100755 --- a/Contestation/Demandereconnaissancefaciale.php +++ b/Contestation/Demandereconnaissancefaciale.php @@ -50,6 +50,7 @@ require_once "Assure.php"; $assure = new Assure(); + $_SESSION['assure'] = $assure; $_SESSION['codeBdd'] = $codeBdd; $bdd = $assure->geUneBd($codeBdd); @@ -553,7 +554,7 @@ verificationToken = ; - // alert("verificationToken = "+verificationToken); + // alert("verificationToken = "+verificationToken); // Initialisation window.onload = function() { @@ -575,6 +576,7 @@ body: JSON.stringify({ action: 'validate_token', token: verificationToken + $assure }) }) .then(response => response.json()) diff --git a/Contestation/verify_facial_api.php b/Contestation/verify_facial_api.php index acd191a..044a932 100644 --- a/Contestation/verify_facial_api.php +++ b/Contestation/verify_facial_api.php @@ -18,8 +18,10 @@ class FacialVerificationAPI { // public function __construct($db) { public function __construct() { // $this->db = $db; - $assure_api = new Assure(); - $maxAttempts = get_nbTentativeBiometrie($_SESSION['codeEntite']); + // $assure_api = new Assure(); + $assure_api = $_SESSION['assure']; + $maxAttempts = $assure->get_nbTentativeBiometrie($_SESSION['codeEntite']); + $demande = $assure->checkdemandereconnaissancefaciale_id(); } /** @@ -413,6 +415,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { // $api = new FacialVerificationAPI($db->getConnection()); $api = new FacialVerificationAPI(); + + var_dump($api); + exit; switch ($action) { case 'validate_token':