a
This commit is contained in:
parent
e776ea19f7
commit
381f92dbe6
|
|
@ -610,7 +610,6 @@
|
|||
|
||||
function validateToken() {
|
||||
v_csrf_token=$("#csrf_token").val();
|
||||
// alert("verifyPhoto => "+v_csrf_token);
|
||||
|
||||
$.ajax({
|
||||
url: '/Contestation/verify_facial_api.php',
|
||||
|
|
@ -630,9 +629,9 @@
|
|||
}
|
||||
},
|
||||
error: function(xhr, status, err) {
|
||||
// showError('Erreur de connexion au serveur');
|
||||
console.log(xhr.responseText);
|
||||
showError(xhr.responseText);
|
||||
showError('Erreur de connexion au serveur');
|
||||
// console.log(xhr.responseText);
|
||||
// showError(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -721,8 +720,8 @@
|
|||
}),
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
alert("success");
|
||||
console.log(data);
|
||||
// alert("success");
|
||||
// console.log(data);
|
||||
if (data.success && data.match) {
|
||||
showSuccess(data);
|
||||
} else {
|
||||
|
|
@ -730,11 +729,11 @@
|
|||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
alert("error");
|
||||
// alert("error");
|
||||
showError('Erreur lors de la vérification: ' + error);
|
||||
showError(xhr.responseText);
|
||||
console.log(error);
|
||||
console.log(xhr.responseText);
|
||||
// showError(xhr.responseText);
|
||||
// console.log(error);
|
||||
// console.log(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,27 +70,14 @@ class FacialVerificationAPI {
|
|||
* Comparaison avec AWS Rekognition (Alternative)
|
||||
*/
|
||||
private function compareWithAWSRekognition($referenceImagePath, $capturedImageBase64) {
|
||||
// require_once '/var/www/Config/vendor/autoload.php';
|
||||
|
||||
try {
|
||||
require_once '/var/www/Config/Faceebene.php';
|
||||
/*
|
||||
$rekognitionClient = new Aws\Rekognition\RekognitionClient([
|
||||
'version' => 'latest',
|
||||
'region' => 'us-west-2',
|
||||
'credentials' => [
|
||||
'key' => 'AKIA2O2PTXQ7XN5OATO3',
|
||||
'secret' => 'Rzq5mKG80tqfePQYF6iFZ5AMCM/bY2l6i5IxxLzL'
|
||||
]
|
||||
]);
|
||||
*/
|
||||
|
||||
|
||||
$referenceImageData = $referenceImagePath;
|
||||
$capturedImageData = $capturedImageBase64;
|
||||
|
||||
$this->assure_api->init_traiterlaface('2');
|
||||
|
||||
// $result = $rekognitionClient->compareFaces([
|
||||
$result = $client->compareFaces([
|
||||
'SourceImage' => ['Bytes' => base64_decode($capturedImageData)],
|
||||
'TargetImage' => ['Bytes' => base64_decode($referenceImageData)],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user