a
This commit is contained in:
parent
22db8f480f
commit
5b1168aa7e
|
|
@ -777,7 +777,9 @@
|
||||||
|
|
||||||
// Redirection automatique après 5 secondes
|
// Redirection automatique après 5 secondes
|
||||||
startCountdown(5, () => {
|
startCountdown(5, () => {
|
||||||
window.location.href = data.redirect_url || 'dashboard.php';
|
// window.location.href = data.redirect_url || 'dashboard.php';
|
||||||
|
// On recharge la page
|
||||||
|
location.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,8 @@ class FacialVerificationAPI {
|
||||||
'SimilarityThreshold' => 80
|
'SimilarityThreshold' => 80
|
||||||
]);
|
]);
|
||||||
|
|
||||||
var_dump($result);
|
// var_dump($result);
|
||||||
exit;
|
// exit;
|
||||||
|
|
||||||
if (empty($result['FaceMatches'])) {
|
if (empty($result['FaceMatches'])) {
|
||||||
return [
|
return [
|
||||||
|
|
@ -180,6 +180,8 @@ class FacialVerificationAPI {
|
||||||
*/
|
*/
|
||||||
private function createAuthorizationSession($assureId, $verificationRequestId) {
|
private function createAuthorizationSession($assureId, $verificationRequestId) {
|
||||||
$sessionToken = bin2hex(random_bytes(32));
|
$sessionToken = bin2hex(random_bytes(32));
|
||||||
|
|
||||||
|
/*
|
||||||
$expiresAt = date('Y-m-d H:i:s', time() + 3600);
|
$expiresAt = date('Y-m-d H:i:s', time() + 3600);
|
||||||
|
|
||||||
$sql = "INSERT INTO prestation_authorization_sessions
|
$sql = "INSERT INTO prestation_authorization_sessions
|
||||||
|
|
@ -188,8 +190,10 @@ class FacialVerificationAPI {
|
||||||
|
|
||||||
$stmt = $this->db->prepare($sql);
|
$stmt = $this->db->prepare($sql);
|
||||||
$stmt->execute([$assureId, $verificationRequestId, $sessionToken, $expiresAt]);
|
$stmt->execute([$assureId, $verificationRequestId, $sessionToken, $expiresAt]);
|
||||||
|
*/
|
||||||
|
|
||||||
return $sessionToken;
|
return $sessionToken;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -252,8 +256,8 @@ class FacialVerificationAPI {
|
||||||
'match' => true,
|
'match' => true,
|
||||||
'confidence' => $comparisonResult['confidence'],
|
'confidence' => $comparisonResult['confidence'],
|
||||||
'message' => 'Identité vérifiée avec succès',
|
'message' => 'Identité vérifiée avec succès',
|
||||||
'session_token' => $sessionToken,
|
// 'session_token' => $sessionToken,
|
||||||
'redirect_url' => 'saisie_prestations.php?token=' . $sessionToken
|
// 'redirect_url' => 'saisie_prestations.php?token=' . $sessionToken
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$attemptsRemaining = $this->maxAttempts - ($request['attempts'] + 1);
|
$attemptsRemaining = $this->maxAttempts - ($request['attempts'] + 1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user