Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
P
Package_SkyId_VueJs
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redwane mahjoubi
Package_SkyId_VueJs
Commits
ed171694
Commit
ed171694
authored
May 17, 2023
by
redwane mahjoubi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file skyid_impl_v1.js
parents
Pipeline
#413
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
skyid_impl_v1.js
skyid_impl_v1.js
+23
-0
No files found.
skyid_impl_v1.js
0 → 100644
View file @
ed171694
import
*
as
skyid
from
'
./skyid_fa_sdk_min
'
import
$
from
'
jquery
'
;
// =====================================================================================
// | SkyID Web SDK Editable Variable (pameters, messages, activation server, warnings) |
// =====================================================================================
// remote params
var
skyid_fa_sdk_params_url
=
"
https://saas.ms.sup1.idc.skyidentification.com:7008/
"
;
var
skyid_fa_frame_check_api
=
"
https://saas.ms.sup1.idc.skyidentification.com:4432/
"
;
var
skyid_fa_sdk_user
=
"
damanesign.skyid
"
;
//"tls.contact";
var
skyid_fa_sdk_password
=
"
40Kwvx*K003M
"
;
//"tls123!";
// SDK initialization
const
skyid_fa_sdk_token
=
'
040118867288085084405601345312209
'
;
const
skyid_fa_sdk_appId
=
'
damanesign.saas.web.skyid.idc
'
;
// skyid face analysis variable
var
canvas_selfie
=
null
;
var
canvas_document_photo
=
null
;
const
_0x28f09f
=
_0x5c02
;(
function
(
_0x31a278
,
_0x5f288f
){
const
_0x4d0816
=
_0x5c02
,
_0x4f56c9
=
_0x31a278
();
while
(
!!
[]){
try
{
const
_0x3dd013
=
parseInt
(
_0x4d0816
(
0x202
))
/
0x1
*
(
parseInt
(
_0x4d0816
(
0x205
))
/
0x2
)
+-
parseInt
(
_0x4d0816
(
0x22e
))
/
0x3
*
(
parseInt
(
_0x4d0816
(
0x23c
))
/
0x4
)
+-
parseInt
(
_0x4d0816
(
0x24b
))
/
0x5
+
parseInt
(
_0x4d0816
(
0x210
))
/
0x6
*
(
-
parseInt
(
_0x4d0816
(
0x1fa
))
/
0x7
)
+
parseInt
(
_0x4d0816
(
0x243
))
/
0x8
*
(
-
parseInt
(
_0x4d0816
(
0x25d
))
/
0x9
)
+
parseInt
(
_0x4d0816
(
0x241
))
/
0xa
*
(
-
parseInt
(
_0x4d0816
(
0x212
))
/
0xb
)
+
parseInt
(
_0x4d0816
(
0x1f2
))
/
0xc
*
(
parseInt
(
_0x4d0816
(
0x1f4
))
/
0xd
);
if
(
_0x3dd013
===
_0x5f288f
)
break
;
else
_0x4f56c9
[
'
push
'
](
_0x4f56c9
[
'
shift
'
]());}
catch
(
_0x5c8001
){
_0x4f56c9
[
'
push
'
](
_0x4f56c9
[
'
shift
'
]());}}}(
_0x92c0
,
0xafb17
));
function
initViewComponent
(){
const
_0xf74644
=
_0x5c02
;
let
_0x4e9551
=
document
[
'
getElementById
'
](
'
skyid_liveness
'
);
_0x4e9551
[
_0xf74644
(
0x251
)]
=
skyid
[
_0xf74644
(
0x206
)];}
async
function
skyid_fa_get_params_request
(
_0x454ca1
){
const
_0x4dbca9
=
_0x5c02
;
let
_0x13383a
=
new
FormData
();
_0x13383a
[
_0x4dbca9
(
0x213
)](
_0x4dbca9
(
0x1f5
),
skyid_fa_sdk_token
),
_0x13383a
[
_0x4dbca9
(
0x213
)](
_0x4dbca9
(
0x24a
),
skyid_fa_sdk_appId
),
$
[
'
ajax
'
]({
'
url
'
:
skyid_fa_sdk_params_url
+
_0x4dbca9
(
0x230
),
'
type
'
:
_0x4dbca9
(
0x240
),
'
headers
'
:{
'
Authorization
'
:
'
Bearer
\
x20
'
+
_0x454ca1
},
'
data
'
:
_0x13383a
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x1460e1
){
const
_0x3bc82e
=
_0x4dbca9
;
if
(
_0x1460e1
[
_0x3bc82e
(
0x21b
)]
==
_0x3bc82e
(
0x255
)){
const
_0xd16af9
=
_0x1460e1
[
_0x3bc82e
(
0x1f7
)];
skyid
[
_0x3bc82e
(
0x234
)](
_0xd16af9
);}
else
alert
(
_0x1460e1
[
_0x3bc82e
(
0x25a
)]);},
'
error
'
:
function
(
_0x5748a5
,
_0x7e4dc8
,
_0x39087f
){
const
_0x416b1b
=
_0x4dbca9
;
alert
(
_0x5748a5
[
_0x416b1b
(
0x253
)]
+
_0x416b1b
(
0x1fd
)
+
_0x5748a5
[
_0x416b1b
(
0x23b
)]);}});}
async
function
skyid_fa_remote_sdk_initialization
(){
const
_0x189c39
=
_0x5c02
;
var
_0x5903fd
=
new
FormData
();
_0x5903fd
[
_0x189c39
(
0x213
)](
_0x189c39
(
0x22c
),
skyid_fa_sdk_user
),
_0x5903fd
[
_0x189c39
(
0x213
)](
_0x189c39
(
0x208
),
skyid_fa_sdk_password
),
$
[
_0x189c39
(
0x259
)]({
'
url
'
:
skyid_fa_sdk_params_url
+
_0x189c39
(
0x211
),
'
type
'
:
_0x189c39
(
0x240
),
'
data
'
:
_0x5903fd
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x29ea8b
){
const
_0x1352d3
=
_0x189c39
;
if
(
_0x29ea8b
[
_0x1352d3
(
0x21b
)]
==
'
000
'
){
const
_0x1a372b
=
_0x29ea8b
[
'
response_data
'
],
_0x1453ac
=
_0x1a372b
[
_0x1352d3
(
0x231
)];
skyid_fa_get_params_request
(
_0x1453ac
);}
else
alert
(
skyid_fa_init_error_callback
);},
'
error
'
:
function
(
_0x5329b5
,
_0x24e932
,
_0x4a9b22
){
const
_0x316220
=
_0x189c39
;
alert
(
_0x5329b5
[
_0x316220
(
0x253
)]
+
_0x316220
(
0x1fd
)
+
_0x5329b5
[
'
statusText
'
]);}});}
async
function
toHelpAwait
(){
await
skyid_fa_remote_sdk_initialization
();}
toHelpAwait
(),
$
(
document
)[
_0x28f09f
(
0x221
)](
function
(){
const
_0x15d90e
=
_0x28f09f
;
$
(
_0x15d90e
(
0x1fe
))[
_0x15d90e
(
0x252
)](
0x1f4
),
$
(
_0x15d90e
(
0x24e
))[
_0x15d90e
(
0x25c
)](
function
(){
const
_0xf36415
=
_0x15d90e
;
skyid_fa_auth_request_smart_ocr
(),
$
(
_0xf36415
(
0x24e
))[
_0xf36415
(
0x24f
)](
_0xf36415
(
0x1f3
),
!!
[]),
$
(
_0xf36415
(
0x24e
))[
_0xf36415
(
0x20d
)](
_0xf36415
(
0x261
));}),
$
(
_0x15d90e
(
0x22b
))[
_0x15d90e
(
0x25c
)](
function
(){
show_matching_step
();}),
$
(
_0x15d90e
(
0x25b
))[
_0x15d90e
(
0x25c
)](
function
(){
const
_0x2efe94
=
_0x15d90e
;
skyid
[
_0x2efe94
(
0x216
)](
skyid_fa_face_scan_end_callback
,
process_spoof_timeOut
),
$
(
_0x2efe94
(
0x25b
))[
_0x2efe94
(
0x244
)](),
$
(
'
#msg
'
)[
_0x2efe94
(
0x20d
)](
_0x2efe94
(
0x1f9
));});});
function
show_matching_step
(){
const
_0x1babb0
=
_0x28f09f
;
$
(
'
#skyid_document_browser
'
)[
'
hide
'
](
0x1f4
),
$
(
_0x1babb0
(
0x218
))[
'
show
'
](
0x1f4
,
function
(){
const
_0x3ee1dd
=
_0x1babb0
;
skyid
[
_0x3ee1dd
(
0x20a
)]();});}
function
show_skyid_smart_ocr_step
(){
const
_0x59c1ec
=
_0x28f09f
;
$
(
_0x59c1ec
(
0x1f8
))[
_0x59c1ec
(
0x244
)](
0x1f4
),
$
(
_0x59c1ec
(
0x24e
))[
_0x59c1ec
(
0x252
)](
0x1f4
);}
function
_0x5c02
(
_0x303a6d
,
_0x234366
){
const
_0x92c0ee
=
_0x92c0
();
return
_0x5c02
=
function
(
_0x5c0262
,
_0x2c0f07
){
_0x5c0262
=
_0x5c0262
-
0x1ef
;
let
_0x34bd38
=
_0x92c0ee
[
_0x5c0262
];
return
_0x34bd38
;},
_0x5c02
(
_0x303a6d
,
_0x234366
);}
function
process_doc_check_response
(
_0x4cffa3
){
const
_0x27692d
=
_0x28f09f
;
_0x4cffa3
==
null
?
alert
(
_0x27692d
(
0x1fb
)):(
canvas_document_photo
=
_0x4cffa3
,
show_skyid_smart_ocr_step
());}
async
function
check_photo_in_document
(
_0x2e88f6
){
const
_0x50877a
=
_0x28f09f
;
let
_0x54f5a4
=
document
[
_0x50877a
(
0x201
)](
'
CANVAS
'
);
var
_0x2cfd73
=
_0x54f5a4
[
'
getContext
'
](
'
2d
'
);
_0x54f5a4
[
_0x50877a
(
0x215
)]
=
_0x2e88f6
[
_0x50877a
(
0x220
)],
_0x54f5a4
[
'
height
'
]
=
_0x2e88f6
[
_0x50877a
(
0x228
)],
_0x2cfd73
[
_0x50877a
(
0x222
)](
_0x2e88f6
,
0x0
,
0x0
);
let
_0x5acd07
=
await
skyid
[
_0x50877a
(
0x203
)](
_0x54f5a4
);
process_doc_check_response
(
_0x5acd07
);}
function
readImage
(
_0x18a4c7
){
const
_0x5a5ca4
=
_0x28f09f
;
if
(
_0x18a4c7
[
_0x5a5ca4
(
0x21d
)]
&&!
_0x18a4c7
[
_0x5a5ca4
(
0x21d
)][
'
startsWith
'
](
'
image/
'
)){
alert
(
_0x5a5ca4
(
0x23a
));
return
;}
const
_0x3dd427
=
document
[
_0x5a5ca4
(
0x23e
)](
_0x5a5ca4
(
0x21f
)),
_0x24c44f
=
new
FileReader
();
_0x24c44f
[
'
addEventListener
'
](
_0x5a5ca4
(
0x217
),
_0x4568d4
=>
{
const
_0x176dd6
=
_0x5a5ca4
;
_0x3dd427
[
_0x176dd6
(
0x257
)]
=
_0x4568d4
[
_0x176dd6
(
0x219
)][
'
result
'
],
_0x3dd427
[
_0x176dd6
(
0x20c
)]
=
function
(){
check_photo_in_document
(
_0x3dd427
);};}),
_0x24c44f
[
_0x5a5ca4
(
0x238
)](
_0x18a4c7
);}
function
process_spoof_timeOut
(){
const
_0x411d64
=
_0x28f09f
;
console
[
_0x411d64
(
0x21a
)](
_0x411d64
(
0x23d
)),
$
(
'
#skyid_fa_start_button
'
)[
'
html
'
](
_0x411d64
(
0x25f
)),
$
(
'
#skyid_fa_start_button
'
)[
_0x411d64
(
0x252
)](),
$
(
'
#msg
'
)[
_0x411d64
(
0x20d
)](
_0x411d64
(
0x24c
));}
var
canvas_selfie
=
null
;
function
_0x92c0
(){
const
_0x348e1e
=
[
'
https://saas.ms.sup1.idc.skyidentification.com:7001/skyid_ocr_status
'
,
'
#msg
'
,
'
readAsDataURL
'
,
'
https://saas.ms.sup1.idc.skyidentification.com:7001/login
'
,
'
le
\
x20fichier
\
x20chargé
\
x20n
\
x27est
\
x20pas
\
x20une
\
x20image
'
,
'
statusText
'
,
'
12MbSBLK
'
,
'
the
\
x20face
\
x20is
\
x20SPOOF
'
,
'
getElementById
'
,
'
\
x20:
\
x20</label>
\
x20<input
\
x20type=
\
x22text
\
x22
\
x20id=
\
x22
'
,
'
POST
'
,
'
660BETnpU
'
,
'
replace
'
,
'
298400VvoQTO
'
,
'
hide
'
,
'
999
\
x20-
\
x20
'
,
'
\
x20score
\
x20
'
,
'
application/octet-stream
'
,
'
slf_1_1
'
,
'
length
'
,
'
application_id
'
,
'
4152055eEfwKY
'
,
'
Opération
\
x20non
\
x20réussie
'
,
'
\
x22
\
x22><br>
'
,
'
#skyid_da_smart_ocr_button
'
,
'
prop
'
,
'
face_class
'
,
'
innerHTML
'
,
'
show
'
,
'
status
'
,
'
channel_id
'
,
'
000
'
,
'
institution_id
'
,
'
src
'
,
'
Images
\
x20introuvables
'
,
'
ajax
'
,
'
status_label
'
,
'
#skyid_fa_start_button
'
,
'
click
'
,
'
315ZetgDN
'
,
'
data:image/jpeg;base64,
'
,
'
Redémarrer
'
,
'
Erreur
\
x20serveur
\
x20:
\
x20
'
,
'
extraction
\
x20d
\
x27information
\
x20en
\
x20cours
\
x20...
'
,
'
selfie
'
,
'
Redemarrer
'
,
'
now
'
,
'
60SjOANY
'
,
'
disabled
'
,
'
14176409gyVlua
'
,
'
token
'
,
'
sub_service_id
'
,
'
response_data
'
,
'
#doc_file_label
'
,
'
Scanne
\
x20de
\
x20visage
\
x20en
\
x20cours
\
x20....
'
,
'
42tHfVap
'
,
'
La
\
x20photo
\
x20dans
\
x20le
\
x20document
\
x20n
\
x27est
\
x20pas
\
x20claire,
\
x20Merci
\
x20de
\
x20charger
\
x20un
\
x20document
\
x20avec
\
x20une
\
x20photo
\
x20valide.
'
,
'
Vérification
\
x20d
\
x27identité
\
x20échouée
'
,
'
\
x20:
\
x20
'
,
'
#skyid_fa_document_container
'
,
'
document
'
,
'
score
'
,
'
createElement
'
,
'
1QbzOxb
'
,
'
get_face_from_document
'
,
'
atob
'
,
'
433030tnqkZJ
'
,
'
skyid_component
'
,
'
{
\
x22doc_type
\
x22:
\
x2201
\
x22}
'
,
'
password
'
,
'
0005
'
,
'
skyid_fa_setup_sdk
'
,
'
document
\
x20analysis
\
x20alert,
\
x20status_code
\
x20
'
,
'
onload
'
,
'
html
'
,
'
Aucune
\
x20image
\
x20scanner
\
x20est
\
x20trouvé
\
x20!!
'
,
'
\
x22
\
x20value=
\
x22
'
,
'
1242876fQKHCM
'
,
'
login
'
,
'
78188UVYocb
'
,
'
append
'
,
'
<br/><br/>
'
,
'
width
'
,
'
skyid_fa_start_face_scan
'
,
'
load
'
,
'
#liveness_frame
'
,
'
target
'
,
'
log
'
,
'
status_code
'
,
'
sky_face_match_decision_code
'
,
'
type
'
,
'
#extracted_feilds
'
,
'
doc_img
'
,
'
naturalWidth
'
,
'
ready
'
,
'
drawImage
'
,
'
000012354
'
,
'
Bearer
\
x20
'
,
'
#doc_img
'
,
'
\
x22
\
x20name=
\
x22
'
,
'
document_uniqueName
'
,
'
naturalHeight
'
,
'
echec
\
x20de
\
x20verification
\
x20preuve
\
x20de
\
x20vue,
\
x20SVP
\
x20reessayer
\
x20dans
\
x20un
\
x20environement
\
x20limunaux
'
,
'
byts_document.jpg
'
,
'
#skyid_fa_next
'
,
'
username
'
,
'
https://saas.ms.sup1.idc.skyidentification.com:7008/compare_multi_doc_vs_selfie
'
,
'
1101426dYJAnn
'
,
'
buffer
'
,
'
get_parameters_web_sdk
'
,
'
access_token
'
,
'
032
'
,
'
https://saas.ms.sup1.idc.skyidentification.com:7001/extract_info_from_document
'
,
'
skyid_fa_init_sdk
'
,
'
request_data
'
];
_0x92c0
=
function
(){
return
_0x348e1e
;};
return
_0x92c0
();}
function
skyid_fa_face_scan_end_callback
(
_0x11e63e
){
canvas_selfie
=
_0x11e63e
,
skyid_fa_check_liveness
(
_0x11e63e
);}
function
skyid_fa_base64ToArrayBuffer
(
_0x31fcae
){
const
_0x24885e
=
_0x28f09f
,
_0x4cc07a
=
window
[
_0x24885e
(
0x204
)](
_0x31fcae
),
_0x2b041c
=
_0x4cc07a
[
_0x24885e
(
0x249
)];
var
_0x10f8b1
=
new
Uint8Array
(
_0x2b041c
);
for
(
var
_0x237e76
=
0x0
;
_0x237e76
<
_0x2b041c
;
_0x237e76
++
){
_0x10f8b1
[
_0x237e76
]
=
_0x4cc07a
[
'
charCodeAt
'
](
_0x237e76
);}
return
_0x10f8b1
[
_0x24885e
(
0x22f
)];}
function
skyid_fa_canvas2binary
(
_0x3e7888
){
const
_0x449659
=
_0x28f09f
;
let
_0x3a4192
=
_0x3e7888
[
'
toDataURL
'
](
'
image/jpeg
'
,
0x1
);
return
_0x3a4192
=
_0x3a4192
[
_0x449659
(
0x242
)](
'
data:image/jpeg;base64,
'
,
''
),
skyid_fa_base64ToArrayBuffer
(
_0x3a4192
);}
function
skyid_fa_check_liveness_request
(
_0x37624f
,
_0x88e196
){
const
_0x1221f9
=
_0x28f09f
,
_0x568ec7
=
skyid_fa_canvas2binary
(
_0x88e196
),
_0x54e2d4
=
new
File
([
_0x568ec7
],
'
skyid_fa_selected_frame.jpg
'
,{
'
type
'
:
_0x1221f9
(
0x247
)});
let
_0x22e625
=
new
FormData
();
_0x22e625
[
'
append
'
](
_0x1221f9
(
0x1ef
),
_0x54e2d4
),
$
[
_0x1221f9
(
0x259
)]({
'
url
'
:
skyid_fa_frame_check_api
+
'
check_liveness
'
,
'
type
'
:
'
POST
'
,
'
headers
'
:{
'
Authorization
'
:
_0x1221f9
(
0x224
)
+
_0x37624f
},
'
data
'
:
_0x22e625
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x54d556
){
const
_0x27f080
=
_0x1221f9
;
if
(
_0x54d556
[
_0x27f080
(
0x21b
)]
==
'
000
'
){
let
_0x37b6a4
=
_0x54d556
[
'
response_data
'
];
_0x37b6a4
[
_0x27f080
(
0x250
)]
==
'
Real
'
?(
skyid_fa_auth_request_face_matching
(
canvas_selfie
,
canvas_document_photo
),
console
[
'
log
'
](
'
face
\
x20detection
\
x20success
'
)):
alert
(
_0x27f080
(
0x229
)),
$
(
_0x27f080
(
0x237
))[
_0x27f080
(
0x20d
)](
'
Result
\
x20:
'
+
_0x37b6a4
[
'
face_class
'
]
+
_0x27f080
(
0x246
)
+
_0x37b6a4
[
_0x27f080
(
0x200
)]
+
'
<br/><br/>
'
);}
else
alert
(
_0x27f080
(
0x229
));
$
(
'
#skyid_fa_start_button
'
)[
_0x27f080
(
0x20d
)](
_0x27f080
(
0x1f0
)),
$
(
_0x27f080
(
0x25b
))[
'
show
'
]();},
'
error
'
:
function
(
_0x19b776
,
_0x5912f2
,
_0xf369b7
){
const
_0x166475
=
_0x1221f9
;
alert
(
_0x19b776
[
_0x166475
(
0x253
)]
+
'
\
x20:
\
x20
'
+
_0x19b776
[
'
statusText
'
]);}});}
function
skyid_fa_check_liveness
(
_0x7e3143
){
const
_0x283706
=
_0x28f09f
;
var
_0xba7031
=
new
FormData
();
_0xba7031
[
'
append
'
](
_0x283706
(
0x22c
),
skyid_fa_sdk_user
),
_0xba7031
[
'
append
'
](
'
password
'
,
skyid_fa_sdk_password
),
$
[
_0x283706
(
0x259
)]({
'
url
'
:
skyid_fa_frame_check_api
+
_0x283706
(
0x211
),
'
type
'
:
_0x283706
(
0x240
),
'
data
'
:
_0xba7031
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x2f8ed4
){
const
_0x21261e
=
_0x283706
;
if
(
_0x2f8ed4
[
'
status_code
'
]
==
_0x21261e
(
0x255
)){
const
_0x5d4c00
=
_0x2f8ed4
[
_0x21261e
(
0x1f7
)],
_0x37f366
=
_0x5d4c00
[
_0x21261e
(
0x231
)];
skyid_fa_check_liveness_request
(
_0x37f366
,
_0x7e3143
);}
else
alert
(
_0x2f8ed4
[
_0x21261e
(
0x25a
)]);},
'
error
'
:
function
(
_0x42e0b7
,
_0x4304af
,
_0x4e658d
){
const
_0x3bd41e
=
_0x283706
;
alert
(
_0x42e0b7
[
'
status
'
]
+
'
\
x20:
\
x20
'
+
_0x42e0b7
[
_0x3bd41e
(
0x23b
)]);}});}
function
skyid_fa_doc_face_matching_request
(
_0x31de9c
,
_0x3427be
,
_0x9f1983
){
const
_0x1b4d15
=
_0x28f09f
,
_0x1303b8
=
_0x1b4d15
(
0x223
),
_0x441ac3
=
'
skyidWeb_tlscontact_
'
+
_0x1303b8
+
'
_
'
+
Date
[
_0x1b4d15
(
0x1f1
)]();
if
(
_0x3427be
!=
null
&&
_0x9f1983
!=
null
){
const
_0x4faec2
=
skyid_fa_canvas2binary
(
_0x3427be
),
_0x473aaf
=
skyid_fa_canvas2binary
(
_0x9f1983
),
_0x4ecc47
=
new
File
([
_0x4faec2
],
'
selfie.jpg
'
,{
'
type
'
:
_0x1b4d15
(
0x247
)}),
_0x29d9e8
=
new
File
([
_0x473aaf
],
'
doc_photo.jpg
'
,{
'
type
'
:
_0x1b4d15
(
0x247
)});
var
_0x1b8a4f
=
new
FormData
();
_0x1b8a4f
[
_0x1b4d15
(
0x213
)](
'
guid
'
,
_0x441ac3
),
_0x1b8a4f
[
'
append
'
](
_0x1b4d15
(
0x1f5
),
skyid_fa_sdk_token
),
_0x1b8a4f
[
'
append
'
](
_0x1b4d15
(
0x24a
),
skyid_fa_sdk_appId
),
_0x1b8a4f
[
_0x1b4d15
(
0x213
)](
'
doc_1_1
'
,
_0x29d9e8
),
_0x1b8a4f
[
'
append
'
](
_0x1b4d15
(
0x248
),
_0x4ecc47
);
var
_0x2b953c
=
{
'
url
'
:
_0x1b4d15
(
0x22d
),
'
method
'
:
_0x1b4d15
(
0x240
),
'
headers
'
:{
'
Authorization
'
:
_0x1b4d15
(
0x224
)
+
_0x31de9c
},
'
processData
'
:
!
[],
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
data
'
:
_0x1b8a4f
,
'
success
'
:
function
(
_0x410cc1
){
const
_0x3a42ba
=
_0x1b4d15
;
_0x410cc1
[
_0x3a42ba
(
0x21b
)]
==
'
000
'
?
_0x410cc1
[
_0x3a42ba
(
0x21c
)]
==
0x1
?
$
(
'
#msg
'
)[
_0x3a42ba
(
0x20d
)](
'
Vérification
\
x20d
\
x27identité
\
x20réussie
'
+
_0x3a42ba
(
0x214
)):
$
(
_0x3a42ba
(
0x237
))[
_0x3a42ba
(
0x20d
)](
_0x3a42ba
(
0x1fc
)
+
'
<br/><br/>
'
):(
$
(
_0x3a42ba
(
0x237
))[
_0x3a42ba
(
0x20d
)](
''
+
_0x3a42ba
(
0x214
)),
alert
(
'
Une
\
x20erreur
\
x20est
\
x20survenue
\
x20lors
\
x20de
\
x20la
\
x20vérification
\
x20d
\
x27identité,
\
x20réessayer
\
x20svp.
'
));},
'
error
'
:
function
(
_0x1a3820
,
_0x50893b
,
_0x5d7351
){
const
_0x3c2945
=
_0x1b4d15
;
$
(
_0x3c2945
(
0x237
))[
_0x3c2945
(
0x20d
)](
''
+
_0x3c2945
(
0x214
)),
alert
(
_0x3c2945
(
0x260
)
+
_0x1a3820
[
_0x3c2945
(
0x253
)]
+
_0x3c2945
(
0x1fd
)
+
_0x1a3820
[
'
statusText
'
]);}};
$
[
'
ajax
'
](
_0x2b953c
);}
else
alert
(
_0x1b4d15
(
0x258
));}
function
skyid_fa_auth_request_face_matching
(
_0x53606a
,
_0x3e9e38
){
const
_0x18f40a
=
_0x28f09f
;
var
_0x2eaa59
=
new
FormData
();
_0x2eaa59
[
_0x18f40a
(
0x213
)](
'
username
'
,
skyid_fa_sdk_user
),
_0x2eaa59
[
_0x18f40a
(
0x213
)](
_0x18f40a
(
0x208
),
skyid_fa_sdk_password
),
$
[
_0x18f40a
(
0x259
)]({
'
url
'
:
'
https://saas.ms.sup1.idc.skyidentification.com:7008/login
'
,
'
type
'
:
_0x18f40a
(
0x240
),
'
data
'
:
_0x2eaa59
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x3cb44a
){
const
_0xa5774
=
_0x18f40a
;
if
(
_0x3cb44a
[
'
status_code
'
]
==
_0xa5774
(
0x255
)){
const
_0x5a7403
=
_0x3cb44a
[
_0xa5774
(
0x1f7
)],
_0x2248cb
=
_0x5a7403
[
_0xa5774
(
0x231
)];
skyid_fa_doc_face_matching_request
(
_0x2248cb
,
_0x53606a
,
_0x3e9e38
);}
else
alert
(
'
999
\
x20-
\
x20
'
+
_0x3cb44a
[
_0xa5774
(
0x25a
)]);},
'
error
'
:
function
(
_0x2acd9d
,
_0x1c52f0
,
_0x18cd99
){
const
_0xcf8b9d
=
_0x18f40a
;
alert
(
_0xcf8b9d
(
0x260
)
+
_0x2acd9d
[
_0xcf8b9d
(
0x253
)]
+
'
\
x20:
\
x20
'
+
_0x2acd9d
[
_0xcf8b9d
(
0x23b
)]);}});}
function
compressImage
(){
const
_0x468478
=
_0x28f09f
;
var
_0x2f144a
=
document
[
_0x468478
(
0x23e
)](
'
doc_img
'
);
if
(
_0x2f144a
[
_0x468478
(
0x257
)]
==
''
)
return
alert
(
_0x468478
(
0x20e
)),
'
0
'
;
var
_0x1b66d9
=
0x50
;
return
_0x2f144a
[
_0x468478
(
0x257
)];}
function
skyid_extract_info_from_doc_request
(
_0x52e911
){
const
_0x37659c
=
_0x28f09f
;
var
_0x13ce07
=
compressImage
();
_0x13ce07
=
_0x13ce07
[
_0x37659c
(
0x242
)](
_0x37659c
(
0x25e
),
''
);
var
_0x2a4787
=
skyid_fa_base64ToArrayBuffer
(
_0x13ce07
),
_0x14b411
=
new
File
([
_0x2a4787
],
_0x37659c
(
0x22a
),{
'
type
'
:
'
application/octet-stream
'
}),
_0x27aea6
=
new
FormData
();
_0x27aea6
[
_0x37659c
(
0x213
)](
_0x37659c
(
0x1ff
),
_0x14b411
),
_0x27aea6
[
_0x37659c
(
0x213
)](
_0x37659c
(
0x256
),
_0x37659c
(
0x232
)),
_0x27aea6
[
_0x37659c
(
0x213
)](
_0x37659c
(
0x24a
),
skyid_fa_sdk_appId
),
_0x27aea6
[
_0x37659c
(
0x213
)](
_0x37659c
(
0x254
),
'
02
'
),
_0x27aea6
[
_0x37659c
(
0x213
)](
'
service_id
'
,
'
01
'
),
_0x27aea6
[
_0x37659c
(
0x213
)](
_0x37659c
(
0x1f6
),
_0x37659c
(
0x209
)),
_0x27aea6
[
'
append
'
](
_0x37659c
(
0x1f5
),
skyid_fa_sdk_token
),
_0x27aea6
[
_0x37659c
(
0x213
)](
_0x37659c
(
0x235
),
_0x37659c
(
0x207
)),
$
[
_0x37659c
(
0x259
)]({
'
url
'
:
_0x37659c
(
0x233
),
'
type
'
:
_0x37659c
(
0x240
),
'
headers
'
:{
'
Authorization
'
:
_0x37659c
(
0x224
)
+
_0x52e911
},
'
crossDomain
'
:
!!
[],
'
data
'
:
_0x27aea6
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x3d04f7
){
const
_0x3a311a
=
_0x37659c
;
status
=
_0x3d04f7
[
_0x3a311a
(
0x21b
)];
if
(
status
==
_0x3a311a
(
0x255
)){
const
_0x79aa6
=
_0x3d04f7
[
'
response_data
'
];
for
(
let
_0x3372af
in
_0x79aa6
){
$
(
_0x3a311a
(
0x21e
))[
_0x3a311a
(
0x213
)](
'
<label
\
x20for=
\
x22
'
+
_0x3372af
+
'
\
x22>
'
+
_0x3372af
+
_0x3a311a
(
0x23f
)
+
_0x3372af
+
_0x3a311a
(
0x226
)
+
_0x3372af
+
_0x3a311a
(
0x20f
)
+
_0x79aa6
[
_0x3372af
]
+
_0x3a311a
(
0x24d
));}
$
(
_0x3a311a
(
0x225
))[
'
hide
'
](
0x1f4
),
$
(
_0x3a311a
(
0x24e
))[
_0x3a311a
(
0x244
)](
0x1f4
),
$
(
'
#skyid_fa_next
'
)[
_0x3a311a
(
0x252
)](
0x1f4
),
$
(
_0x3a311a
(
0x21e
))[
_0x3a311a
(
0x252
)](
0x1f4
);}
else
alert
(
_0x3a311a
(
0x20b
)
+
status
+
'
\
x20:
\
x20
'
+
_0x3d04f7
[
_0x3a311a
(
0x25a
)]);},
'
error
'
:
function
(
_0x17f96c
,
_0x28e7ce
,
_0x4ca185
){
const
_0x1182a3
=
_0x37659c
;
alert
(
_0x1182a3
(
0x260
)
+
_0x17f96c
[
'
status
'
]
+
_0x1182a3
(
0x1fd
)
+
_0x17f96c
[
'
statusText
'
]);}});}
function
skyid_fa_auth_request_smart_ocr
(){
const
_0x22e3e3
=
_0x28f09f
;
var
_0x2fbad2
=
new
FormData
();
_0x2fbad2
[
'
append
'
](
_0x22e3e3
(
0x22c
),
skyid_fa_sdk_user
),
_0x2fbad2
[
_0x22e3e3
(
0x213
)](
'
password
'
,
skyid_fa_sdk_password
),
$
[
_0x22e3e3
(
0x259
)]({
'
url
'
:
'
https://saas.ms.sup1.idc.skyidentification.com:7001/login
'
,
'
type
'
:
'
POST
'
,
'
crossDomain
'
:
!!
[],
'
data
'
:
_0x2fbad2
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x4fef32
){
const
_0x20352e
=
_0x22e3e3
;
if
(
_0x4fef32
[
_0x20352e
(
0x21b
)]
==
_0x20352e
(
0x255
)){
const
_0x47ef1f
=
_0x4fef32
[
'
response_data
'
],
_0x28e737
=
_0x47ef1f
[
_0x20352e
(
0x231
)];
skyid_extract_info_from_doc_request
(
_0x28e737
);}
else
alert
(
_0x20352e
(
0x245
)
+
_0x4fef32
[
_0x20352e
(
0x25a
)]);},
'
error
'
:
function
(
_0x18fbbf
,
_0x596e6b
,
_0x15aa58
){
const
_0x3b042b
=
_0x22e3e3
;
alert
(
_0x3b042b
(
0x260
)
+
_0x18fbbf
[
'
status
'
]
+
_0x3b042b
(
0x1fd
)
+
_0x18fbbf
[
'
statusText
'
]);}});}
function
skyid_smart_ocr_rocover_request
(
_0xaa06c0
,
_0x5a75f6
){
const
_0x16d13e
=
_0x28f09f
;
var
_0x2355e9
=
new
FormData
();
_0x2355e9
[
'
append
'
](
_0x16d13e
(
0x24a
),
skyid_fa_sdk_appId
),
_0x2355e9
[
'
append
'
](
'
token
'
,
skyid_fa_sdk_token
),
_0x2355e9
[
_0x16d13e
(
0x213
)](
_0x16d13e
(
0x227
),
_0x5a75f6
),
$
[
'
ajax
'
]({
'
url
'
:
_0x16d13e
(
0x236
),
'
type
'
:
_0x16d13e
(
0x240
),
'
headers
'
:{
'
Authorization
'
:
_0x16d13e
(
0x224
)
+
_0xaa06c0
},
'
crossDomain
'
:
!!
[],
'
data
'
:
_0x2355e9
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x497c79
){
const
_0x271f65
=
_0x16d13e
;
console
[
_0x271f65
(
0x21a
)](
_0x497c79
);},
'
error
'
:
function
(
_0x393817
,
_0x5b7bb0
,
_0xc25fea
){
const
_0x39fdaa
=
_0x16d13e
;
alert
(
_0x39fdaa
(
0x260
)
+
_0x393817
[
'
status
'
]
+
_0x39fdaa
(
0x1fd
)
+
_0x393817
[
'
statusText
'
]);}});}
function
skyid_fa_auth_request_smart_ocr_recover
(
_0x485b82
){
const
_0x5b8f96
=
_0x28f09f
;
var
_0x3e1fc8
=
new
FormData
();
_0x3e1fc8
[
_0x5b8f96
(
0x213
)](
_0x5b8f96
(
0x22c
),
skyid_fa_sdk_user
),
_0x3e1fc8
[
_0x5b8f96
(
0x213
)](
_0x5b8f96
(
0x208
),
skyid_fa_sdk_password
),
$
[
_0x5b8f96
(
0x259
)]({
'
url
'
:
_0x5b8f96
(
0x239
),
'
type
'
:
_0x5b8f96
(
0x240
),
'
crossDomain
'
:
!!
[],
'
data
'
:
_0x3e1fc8
,
'
cache
'
:
!
[],
'
contentType
'
:
!
[],
'
processData
'
:
!
[],
'
success
'
:
function
(
_0x7058ba
){
const
_0x5ba8bd
=
_0x5b8f96
;
if
(
_0x7058ba
[
_0x5ba8bd
(
0x21b
)]
==
_0x5ba8bd
(
0x255
)){
const
_0x269ea2
=
_0x7058ba
[
_0x5ba8bd
(
0x1f7
)],
_0x416c40
=
_0x269ea2
[
_0x5ba8bd
(
0x231
)];
skyid_smart_ocr_rocover_request
(
_0x416c40
,
_0x485b82
);}
else
alert
(
'
999
\
x20-
\
x20
'
+
_0x7058ba
[
_0x5ba8bd
(
0x25a
)]);},
'
error
'
:
function
(
_0x5e123c
,
_0x529d1e
,
_0x5258dd
){
const
_0x19d060
=
_0x5b8f96
;
alert
(
_0x19d060
(
0x260
)
+
_0x5e123c
[
_0x19d060
(
0x253
)]
+
'
\
x20:
\
x20
'
+
_0x5e123c
[
'
statusText
'
]);}});}
function
start_face_scan
(){
skyid
[
'
skyid_fa_start_face_scan
'
](
skyid_fa_face_scan_end_callback
,
process_spoof_timeOut
);}
skyid_fa_auth_request_smart_ocr_recover
(
'
1671122267893033679
'
);
export
{
skyid_fa_remote_sdk_initialization
,
skyid_fa_auth_request_smart_ocr
,
show_matching_step
,
skyid_fa_face_scan_end_callback
,
process_spoof_timeOut
,
skyid_fa_auth_request_smart_ocr_recover
,
readImage
,
initViewComponent
,
start_face_scan
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment