uqudosdk-react-native 2.6.0-1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 2.7.0
|
|
2
|
+
|
|
3
|
+
* In this latest release, we've revamped the facial recognition step. We've eliminated the nodding step, transforming facial recognition into a straightforward process easy as capturing a selfie. Under the hood, numerous enhancements have been implemented to ensure speed, simplicity, and enhanced accuracy. There are no changes in terms of business logic for your integration process
|
|
4
|
+
* Within the iOS native SDK, we have marked several properties under UQEnrollmentBuilder and UQLookupBuilder associated with facial recognition as deprecated. In their place, we've introduced a dedicated entity called UQFacialRecognitionConfig. This entity serves to enable facial recognition and customize the corresponding settings. See the documentation for details
|
|
5
|
+
* We have added a new configuration option for facial recognition that allows closed eyes during facial recognition. By default is disabled. See the documentation for details
|
|
6
|
+
* Improved scanning for Bahrain ID
|
|
7
|
+
* Added support for Lebanon ID and Driving License
|
|
8
|
+
* Minor improvements and minor bug fixes
|
|
9
|
+
|
|
1
10
|
## 2.6.0-1
|
|
2
11
|
|
|
3
12
|
* Fixed bug in the flutter plugin that prevent ios app to build successfully. The bug was introduced in version 2.6.0.
|
package/android/build.gradle
CHANGED
|
@@ -147,7 +147,9 @@ public class UqudoIdModule extends ReactContextBaseJavaModule implements Activit
|
|
|
147
147
|
if (faceObject.has("maxAttempts") && faceObject.getInt("maxAttempts") > 0) {
|
|
148
148
|
faceBuilder.setMaxAttempts(faceObject.getInt("maxAttempts"));
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
if (faceObject.has("allowClosedEyes") && faceObject.getBoolean("allowClosedEyes")) {
|
|
151
|
+
faceBuilder.allowClosedEyes();
|
|
152
|
+
}
|
|
151
153
|
enrollment.enableFacialRecognition(faceBuilder.build());
|
|
152
154
|
}
|
|
153
155
|
if (json.has("lookupConfiguration")) {
|
|
@@ -280,6 +282,9 @@ public class UqudoIdModule extends ReactContextBaseJavaModule implements Activit
|
|
|
280
282
|
if (json.has("maxAttempts") && json.getInt("maxAttempts") > 0) {
|
|
281
283
|
recovery.setMaxAttempts(json.getInt("maxAttempts"));
|
|
282
284
|
}
|
|
285
|
+
if (json.has("allowClosedEyes") && json.getBoolean("allowClosedEyes")) {
|
|
286
|
+
recovery.allowClosedEyes();
|
|
287
|
+
}
|
|
283
288
|
if (json.has("isReturnDataForIncompleteSession") && json.getBoolean("isReturnDataForIncompleteSession")) {
|
|
284
289
|
recovery.returnDataForIncompleteSession();
|
|
285
290
|
}
|
|
@@ -327,6 +332,9 @@ public class UqudoIdModule extends ReactContextBaseJavaModule implements Activit
|
|
|
327
332
|
if (json.has("maxAttempts") && json.getInt("maxAttempts") > 0) {
|
|
328
333
|
faceSession.setMaxAttempts(json.getInt("maxAttempts"));
|
|
329
334
|
}
|
|
335
|
+
if (json.has("allowClosedEyes") && json.getBoolean("allowClosedEyes")) {
|
|
336
|
+
faceSession.allowClosedEyes();
|
|
337
|
+
}
|
|
330
338
|
if (json.has("isReturnDataForIncompleteSession") && json.getBoolean("isReturnDataForIncompleteSession")) {
|
|
331
339
|
faceSession.returnDataForIncompleteSession();
|
|
332
340
|
}
|
|
@@ -386,6 +394,9 @@ public class UqudoIdModule extends ReactContextBaseJavaModule implements Activit
|
|
|
386
394
|
if (faceObject.has("maxAttempts") && faceObject.getInt("maxAttempts") > 0) {
|
|
387
395
|
faceBuilder.setMaxAttempts(faceObject.getInt("maxAttempts"));
|
|
388
396
|
}
|
|
397
|
+
if (faceObject.has("allowClosedEyes") && faceObject.getBoolean("allowClosedEyes")) {
|
|
398
|
+
faceBuilder.allowClosedEyes();
|
|
399
|
+
}
|
|
389
400
|
lookupBuilder.enableFacialRecognition(faceBuilder.build());
|
|
390
401
|
}
|
|
391
402
|
if (json.has("backgroundCheckConfiguration")) {
|
package/ios/UqudoId.m
CHANGED
|
@@ -60,26 +60,31 @@ RCT_EXPORT_METHOD(enroll:(NSString *)enrollObj resolver:(RCTPromiseResolveBlock)
|
|
|
60
60
|
}
|
|
61
61
|
if (facialRecognitionSpecification) {
|
|
62
62
|
// Enable help page for face recognition
|
|
63
|
-
|
|
63
|
+
UQFacialRecognitionConfig *config = [[UQFacialRecognitionConfig alloc] init];
|
|
64
|
+
config.enableFacialRecognition = YES;
|
|
64
65
|
|
|
65
66
|
// Enable enroll face option
|
|
66
67
|
if (facialRecognitionSpecification[@"enrollFace"]) {
|
|
67
|
-
|
|
68
|
+
config.enrollFace = [[facialRecognitionSpecification valueForKey:@"enrollFace"] boolValue];
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
if (facialRecognitionSpecification[@"scanMinimumMatchLevel"]) {
|
|
71
|
-
|
|
72
|
+
config.scanMinimumMatchLevel = [[facialRecognitionSpecification valueForKey:@"scanMinimumMatchLevel"] integerValue];
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
if (facialRecognitionSpecification[@"readMinimumMatchLevel"]) {
|
|
75
|
-
|
|
76
|
+
config.readMinimumMatchLevel = [[facialRecognitionSpecification valueForKey:@"readMinimumMatchLevel"] integerValue];
|
|
76
77
|
}
|
|
77
78
|
if (facialRecognitionSpecification[@"maxAttempts"]) {
|
|
78
79
|
int maxAttempts = [[facialRecognitionSpecification valueForKey:@"maxAttempts"] intValue];
|
|
79
80
|
if (maxAttempts > 0) {
|
|
80
|
-
|
|
81
|
+
config.facialRecognitionMaxAttempts = maxAttempts;
|
|
81
82
|
}
|
|
82
83
|
}
|
|
84
|
+
if (facialRecognitionSpecification[@"allowClosedEyes"]) {
|
|
85
|
+
config.allowClosedEyes = [[facialRecognitionSpecification valueForKey:@"allowClosedEyes"] boolValue];
|
|
86
|
+
}
|
|
87
|
+
enrollmentBuilder.facialRecognitionConfig = config;
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
if(lookupConfiguration){
|
|
@@ -262,6 +267,10 @@ RCT_EXPORT_METHOD(recover:(NSString *)recoverObj resolver:(RCTPromiseResolveBloc
|
|
|
262
267
|
}
|
|
263
268
|
}
|
|
264
269
|
|
|
270
|
+
if (json[@"allowClosedEyes"]) {
|
|
271
|
+
accountRecoveryBuilder.allowClosedEyes = [[json valueForKey:@"allowClosedEyes"] boolValue];
|
|
272
|
+
}
|
|
273
|
+
|
|
265
274
|
if (json[@"isReturnDataForIncompleteSession"]) {
|
|
266
275
|
accountRecoveryBuilder.returnDataForIncompleteSession = [[json valueForKey:@"isReturnDataForIncompleteSession"] boolValue];
|
|
267
276
|
}
|
|
@@ -339,6 +348,10 @@ RCT_EXPORT_METHOD(faceSession:(NSString *)configuration resolver:(RCTPromiseReso
|
|
|
339
348
|
}
|
|
340
349
|
}
|
|
341
350
|
|
|
351
|
+
if (json[@"allowClosedEyes"]) {
|
|
352
|
+
faceSessionBuilder.allowClosedEyes = [[json valueForKey:@"allowClosedEyes"] boolValue];
|
|
353
|
+
}
|
|
354
|
+
|
|
342
355
|
if (json[@"isReturnDataForIncompleteSession"]) {
|
|
343
356
|
faceSessionBuilder.returnDataForIncompleteSession = [[json valueForKey:@"isReturnDataForIncompleteSession"] boolValue];
|
|
344
357
|
}
|
|
@@ -426,21 +439,28 @@ RCT_EXPORT_METHOD(lookup:(NSString *)lookupObj resolver:(RCTPromiseResolveBlock)
|
|
|
426
439
|
}
|
|
427
440
|
NSDictionary* facialRecognitionSpecification = json[@"facialRecognitionSpecification"];
|
|
428
441
|
if (facialRecognitionSpecification) {
|
|
442
|
+
|
|
443
|
+
UQFacialRecognitionConfig *config = [[UQFacialRecognitionConfig alloc] init];
|
|
429
444
|
// Enable help page for face recognition
|
|
430
|
-
|
|
445
|
+
config.enableFacialRecognition = YES;
|
|
431
446
|
// Enable enroll face option
|
|
432
447
|
if (facialRecognitionSpecification[@"enrollFace"]) {
|
|
433
|
-
|
|
448
|
+
config.enrollFace = [[facialRecognitionSpecification valueForKey:@"enrollFace"] boolValue];
|
|
434
449
|
}
|
|
435
450
|
if (facialRecognitionSpecification[@"lookupMinimumMatchLevel"]) {
|
|
436
|
-
|
|
451
|
+
config.minimumMatchLevel = [[facialRecognitionSpecification valueForKey:@"lookupMinimumMatchLevel"] integerValue];
|
|
437
452
|
}
|
|
438
453
|
if (facialRecognitionSpecification[@"maxAttempts"]) {
|
|
439
454
|
int maxAttempts = [[facialRecognitionSpecification valueForKey:@"maxAttempts"] intValue];
|
|
440
455
|
if (maxAttempts > 0) {
|
|
441
|
-
|
|
456
|
+
config.maxAttempts = maxAttempts;
|
|
442
457
|
}
|
|
443
458
|
}
|
|
459
|
+
if (facialRecognitionSpecification[@"allowClosedEyes"]) {
|
|
460
|
+
config.allowClosedEyes = [[facialRecognitionSpecification valueForKey:@"allowClosedEyes"] boolValue];
|
|
461
|
+
}
|
|
462
|
+
lookupBuilder.facialRecognitionConfig = config;
|
|
463
|
+
|
|
444
464
|
}
|
|
445
465
|
NSDictionary* backgroundCheckConfiguration = json[@"backgroundCheckConfiguration"];
|
|
446
466
|
if (backgroundCheckConfiguration) {
|
package/package.json
CHANGED
package/uqudoBuilder/uqudo.js
CHANGED
|
@@ -109,6 +109,8 @@ export const DocumentType = Object.freeze(
|
|
|
109
109
|
SAU_ID_NATIONAL: 'SAU_ID_NATIONAL',
|
|
110
110
|
SAU_ID_RESIDENT: 'SAU_ID_RESIDENT',
|
|
111
111
|
NGA_BVN: 'NGA_BVN'
|
|
112
|
+
LBN_ID: 'LBN_ID',
|
|
113
|
+
LBN_DL: 'LBN_DL',
|
|
112
114
|
}
|
|
113
115
|
);
|
|
114
116
|
|
|
@@ -260,8 +262,13 @@ export class FacialRecognitionConfigurationBuilder {
|
|
|
260
262
|
return this;
|
|
261
263
|
},
|
|
262
264
|
|
|
265
|
+
allowClosedEyes: function () {
|
|
266
|
+
this.isAllowClosedEyes = true;
|
|
267
|
+
return this;
|
|
268
|
+
},
|
|
269
|
+
|
|
263
270
|
build: function () {
|
|
264
|
-
return new FacialRecognitionConfiguration(this.enrollFace, this.scanMinimumMatchLevel, this.readMinimumMatchLevel, this.lookupMinimumMatchLevel, this.maxAttempts);
|
|
271
|
+
return new FacialRecognitionConfiguration(this.enrollFace, this.scanMinimumMatchLevel, this.readMinimumMatchLevel, this.lookupMinimumMatchLevel, this.maxAttempts,this.isAllowClosedEyes);
|
|
265
272
|
}
|
|
266
273
|
};
|
|
267
274
|
}
|
|
@@ -269,12 +276,13 @@ export class FacialRecognitionConfigurationBuilder {
|
|
|
269
276
|
|
|
270
277
|
|
|
271
278
|
export class FacialRecognitionConfiguration {
|
|
272
|
-
constructor(enrollFace, scanMinimumMatchLevel, readMinimumMatchLevel, lookupMinimumMatchLevel, maxAttempts) {
|
|
279
|
+
constructor(enrollFace, scanMinimumMatchLevel, readMinimumMatchLevel, lookupMinimumMatchLevel, maxAttempts,isAllowClosedEyes) {
|
|
273
280
|
this.enrollFace = enrollFace;
|
|
274
281
|
this.scanMinimumMatchLevel = scanMinimumMatchLevel;
|
|
275
282
|
this.readMinimumMatchLevel = readMinimumMatchLevel;
|
|
276
283
|
this.lookupMinimumMatchLevel = lookupMinimumMatchLevel;
|
|
277
284
|
this.maxAttempts = maxAttempts;
|
|
285
|
+
this.allowClosedEyes = isAllowClosedEyes;
|
|
278
286
|
}
|
|
279
287
|
}
|
|
280
288
|
|
|
@@ -331,6 +339,7 @@ export class BackgroundCheckConfiguration {
|
|
|
331
339
|
|
|
332
340
|
export class DocumentBuilder {
|
|
333
341
|
constructor() {
|
|
342
|
+
|
|
334
343
|
return {
|
|
335
344
|
setDocumentType: function (documentType) {
|
|
336
345
|
this.documentType = documentType;
|
|
@@ -418,6 +427,7 @@ export class ReadingConfigurationBuilder {
|
|
|
418
427
|
this.forceReadingValue = false;
|
|
419
428
|
this.forceReadingIfSupportedValue = false;
|
|
420
429
|
this.timeoutInSeconds = -1;
|
|
430
|
+
|
|
421
431
|
return {
|
|
422
432
|
forceReading: function (value) {
|
|
423
433
|
this.forceReadingValue = value;
|
|
@@ -471,6 +481,7 @@ export class Document {
|
|
|
471
481
|
|
|
472
482
|
export class AccountRecoveryBuilder {
|
|
473
483
|
constructor() {
|
|
484
|
+
|
|
474
485
|
return {
|
|
475
486
|
/**
|
|
476
487
|
* Pass the token received from Uqudo to authenticate the SDK
|
|
@@ -526,6 +537,11 @@ export class AccountRecoveryBuilder {
|
|
|
526
537
|
return this;
|
|
527
538
|
},
|
|
528
539
|
|
|
540
|
+
allowClosedEyes: function () {
|
|
541
|
+
this.isAllowClosedEyes = true;
|
|
542
|
+
return this;
|
|
543
|
+
},
|
|
544
|
+
|
|
529
545
|
returnDataForIncompleteSession: function () {
|
|
530
546
|
this.isReturnDataForIncompleteSession = true;
|
|
531
547
|
return this;
|
|
@@ -541,14 +557,14 @@ export class AccountRecoveryBuilder {
|
|
|
541
557
|
* recover the account
|
|
542
558
|
*/
|
|
543
559
|
build: function () {
|
|
544
|
-
return new AccountRecoveryConfiguration(this.authorizationToken, this.enrollmentIdentifier, this.nonce, this.isRootedDeviceAllowed, this.isSecuredWindowsDisabled, this.minimumMatchLevel, this.maxAttempts, this.isReturnDataForIncompleteSession, this.appearanceMode);
|
|
560
|
+
return new AccountRecoveryConfiguration(this.authorizationToken, this.enrollmentIdentifier, this.nonce, this.isRootedDeviceAllowed, this.isSecuredWindowsDisabled, this.minimumMatchLevel, this.maxAttempts, this.isReturnDataForIncompleteSession, this.appearanceMode,this.isAllowClosedEyes);
|
|
545
561
|
}
|
|
546
562
|
}
|
|
547
563
|
}
|
|
548
564
|
}
|
|
549
565
|
|
|
550
566
|
export class AccountRecoveryConfiguration {
|
|
551
|
-
constructor(token, enrollmentIdentifier, nonce, isRootedDeviceAllowed, isSecuredWindowsDisabled, minimumMatchLevel,maxAttempts,isReturnDataForIncompleteSession,appearanceMode) {
|
|
567
|
+
constructor(token, enrollmentIdentifier, nonce, isRootedDeviceAllowed, isSecuredWindowsDisabled, minimumMatchLevel,maxAttempts,isReturnDataForIncompleteSession,appearanceMode,isAllowClosedEyes) {
|
|
552
568
|
this.token = token;
|
|
553
569
|
this.enrollmentIdentifier = enrollmentIdentifier;
|
|
554
570
|
this.nonce = nonce;
|
|
@@ -558,11 +574,13 @@ export class AccountRecoveryConfiguration {
|
|
|
558
574
|
this.maxAttempts = maxAttempts;
|
|
559
575
|
this.isReturnDataForIncompleteSession = isReturnDataForIncompleteSession;
|
|
560
576
|
this.appearanceMode = appearanceMode;
|
|
577
|
+
this.allowClosedEyes = isAllowClosedEyes;
|
|
561
578
|
}
|
|
562
579
|
}
|
|
563
580
|
|
|
564
581
|
export class FaceSessionBuilder {
|
|
565
582
|
constructor() {
|
|
583
|
+
|
|
566
584
|
return {
|
|
567
585
|
setToken: function (token) {
|
|
568
586
|
this.authorizationToken = token;
|
|
@@ -599,6 +617,11 @@ export class FaceSessionBuilder {
|
|
|
599
617
|
return this;
|
|
600
618
|
},
|
|
601
619
|
|
|
620
|
+
allowClosedEyes: function () {
|
|
621
|
+
this.isAllowClosedEyes = true;
|
|
622
|
+
return this;
|
|
623
|
+
},
|
|
624
|
+
|
|
602
625
|
returnDataForIncompleteSession: function () {
|
|
603
626
|
this.isReturnDataForIncompleteSession = true;
|
|
604
627
|
return this;
|
|
@@ -611,14 +634,14 @@ export class FaceSessionBuilder {
|
|
|
611
634
|
|
|
612
635
|
|
|
613
636
|
build: function () {
|
|
614
|
-
return new FaceSessionConfiguration(this.authorizationToken, this.sessionId, this.nonce, this.isRootedDeviceAllowed, this.isSecuredWindowsDisabled, this.minimumMatchLevel, this.maxAttempts, this.isReturnDataForIncompleteSession, this.appearanceMode);
|
|
637
|
+
return new FaceSessionConfiguration(this.authorizationToken, this.sessionId, this.nonce, this.isRootedDeviceAllowed, this.isSecuredWindowsDisabled, this.minimumMatchLevel, this.maxAttempts, this.isReturnDataForIncompleteSession, this.appearanceMode,this.isAllowClosedEyes);
|
|
615
638
|
}
|
|
616
639
|
}
|
|
617
640
|
}
|
|
618
641
|
}
|
|
619
642
|
|
|
620
643
|
export class FaceSessionConfiguration {
|
|
621
|
-
constructor(token, sessionId, nonce, isRootedDeviceAllowed, isSecuredWindowsDisabled, minimumMatchLevel,maxAttempts,isReturnDataForIncompleteSession,appearanceMode) {
|
|
644
|
+
constructor(token, sessionId, nonce, isRootedDeviceAllowed, isSecuredWindowsDisabled, minimumMatchLevel,maxAttempts,isReturnDataForIncompleteSession,appearanceMode,isAllowClosedEyes) {
|
|
622
645
|
this.token = token;
|
|
623
646
|
this.sessionId = sessionId;
|
|
624
647
|
this.nonce = nonce;
|
|
@@ -628,7 +651,7 @@ export class FaceSessionConfiguration {
|
|
|
628
651
|
this.maxAttempts = maxAttempts;
|
|
629
652
|
this.isReturnDataForIncompleteSession = isReturnDataForIncompleteSession;
|
|
630
653
|
this.appearanceMode = appearanceMode;
|
|
631
|
-
|
|
654
|
+
this.allowClosedEyes = isAllowClosedEyes;
|
|
632
655
|
}
|
|
633
656
|
}
|
|
634
657
|
|