uqudosdk-react-native 3.0.0 → 3.0.2

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,24 @@
1
+ ## 3.0.2
2
+
3
+ * Enhanced the screen resolution ratio to optimize facial recognition, aimed at reducing rejections caused by liveness check failures.
4
+ * Reactivated the 'forceReadingTimeout(timeout)' option for the NFC step, allowing users to skip NFC scanning if they're unable to complete it before the timeout expires, with a corresponding notification message.
5
+ * Resolved an iOS bug where customization of the back button layout was not being applied.
6
+ * Removed the debug executable check from the jailbroken security verification process on iOS. Please note that while the SDK performs this check, it's advised to conduct it within your application as well.
7
+ * Introduced a new 'InitializationException' for Android, thrown when the SDK fails to load native libraries due to a bug on certain Android devices. This exception enables your application to handle the issue gracefully instead of crashing.
8
+ * Addressed potential crashes on Android that could occur when the application transitions between background and foreground states during document scanning.
9
+
10
+ ## 3.0.1
11
+
12
+ * Important improvement in the id photo tampering detection during document scanning to identify any alterations to the ID photo.
13
+ * Reduced the level of sensitivity for detecting glares during document scanning.
14
+ * Small improvement during scanning to identify printed copies. As per our previous release, the SDK will not reject scans of printed documents but will provide a score indicating the likelihood of a printed copy under the verification object in the SDK result.
15
+ * Included a new obfuscation type called "FILLED_WHITE" within the facial recognition configuration, which completely substitutes the background with a white color.
16
+ * Introduced a new configuration option called "disableTamperingRejection", directing the SDK not to dismiss the scan upon detecting tampering, specifically for ID photo tampering detection.
17
+ * Deprecated the configuration option called "enrollFace" within the facial recognition configuration, as it is related to the "Account Recovery Flow" deprecated in version 3.0.0. It is planned for removal in a future release.
18
+ * Android: upgraded the camera library to the latest stable version that fixes an important bug that could affect the scan on Samsung A24 devices.
19
+ * iOS: Addressed an issue on iPhone 14 and iPhone 15 base version where the camera failed to focus when documents were in close proximity.
20
+ * iOS: Refactored the implementation to identify whether the device has been rooted.
21
+
1
22
  ## 3.0.0
2
23
 
3
24
  * Introduced a new verification object result within the SDK, including all details pertinent to the verification process. This feature supports your business logic by easily identifying potential issues. Refer to https://docs.uqudo.com/docs/kyc/uqudo-sdk/sdk-result/data-structure/verification-object for comprehensive information.
@@ -33,5 +33,5 @@ android {
33
33
 
34
34
  dependencies {
35
35
  implementation 'com.facebook.react:react-native:+'
36
- implementation 'io.uqudo.sdk:Uqudo:3.0.0'
36
+ implementation 'io.uqudo.sdk:Uqudo:3.0.2'
37
37
  }
@@ -39,6 +39,7 @@ import io.uqudo.sdk.core.builder.BackgroundCheckConfigurationBuilder;
39
39
  import io.uqudo.sdk.core.builder.FacialRecognitionConfigurationBuilder;
40
40
  import io.uqudo.sdk.core.builder.ReadingConfigurationBuilder;
41
41
  import io.uqudo.sdk.core.domain.model.BackgroundCheckType;
42
+ import io.uqudo.sdk.core.domain.model.ObfuscationType;
42
43
  import io.uqudo.sdk.core.domain.model.Document;
43
44
  import io.uqudo.sdk.core.domain.model.DocumentType;
44
45
  import java.text.SimpleDateFormat;
@@ -126,8 +127,11 @@ public class UqudoIdModule extends ReactContextBaseJavaModule implements Activit
126
127
  if (json.has("sessionId")) {
127
128
  enrollment.setSessionId(json.getString("sessionId"));
128
129
  }
129
- if(json.has("isAllowNonPhysicalDocuments"){
130
- enrollment.allowNonPhysicalDocuments()
130
+ if(json.has("isAllowNonPhysicalDocuments")){
131
+ enrollment.allowNonPhysicalDocuments();
132
+ }
133
+ if (json.has("isDisableTamperingRejection")) {
134
+ enrollment.disableTamperingRejection();
131
135
  }
132
136
  if (json.has("userIdentifier")) {
133
137
  enrollment.setUserIdentifier(UUID.fromString(json.getString("userIdentifier")));
@@ -153,6 +157,15 @@ public class UqudoIdModule extends ReactContextBaseJavaModule implements Activit
153
157
  if (faceObject.has("allowClosedEyes") && faceObject.getBoolean("allowClosedEyes")) {
154
158
  faceBuilder.allowClosedEyes();
155
159
  }
160
+ if (faceObject.has("obfuscationType")){
161
+ if (faceObject.getString("obfuscationType").equals("FILLED")){
162
+ faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED);
163
+ } else if (faceObject.getString("obfuscationType").equals("BLURRED")){
164
+ faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.BLURRED);
165
+ } else if (faceObject.getString("obfuscationType").equals("FILLED_WHITE")){
166
+ faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED_WHITE);
167
+ }
168
+ }
156
169
  enrollment.enableFacialRecognition(faceBuilder.build());
157
170
  }
158
171
  if (json.has("lookupConfiguration")) {
@@ -341,6 +354,15 @@ public class UqudoIdModule extends ReactContextBaseJavaModule implements Activit
341
354
  if (json.has("isReturnDataForIncompleteSession") && json.getBoolean("isReturnDataForIncompleteSession")) {
342
355
  faceSession.returnDataForIncompleteSession();
343
356
  }
357
+ if (json.has("obfuscationType")){
358
+ if (json.getString("obfuscationType").equals("FILLED")){
359
+ faceSession.enableAuditTrailImageObfuscation(ObfuscationType.FILLED);
360
+ } else if (json.getString("obfuscationType").equals("BLURRED")){
361
+ faceSession.enableAuditTrailImageObfuscation(ObfuscationType.BLURRED);
362
+ } else if (json.getString("obfuscationType").equals("FILLED_WHITE")){
363
+ faceSession.enableAuditTrailImageObfuscation(ObfuscationType.FILLED_WHITE);
364
+ }
365
+ }
344
366
  Intent intent = faceSession.build(context);
345
367
  if (json.has("appearanceMode")) {
346
368
  if ("LIGHT".equals(json.getString("appearanceMode"))) {
@@ -400,6 +422,15 @@ public class UqudoIdModule extends ReactContextBaseJavaModule implements Activit
400
422
  if (faceObject.has("allowClosedEyes") && faceObject.getBoolean("allowClosedEyes")) {
401
423
  faceBuilder.allowClosedEyes();
402
424
  }
425
+ if (faceObject.has("obfuscationType")){
426
+ if (faceObject.getString("obfuscationType").equals("FILLED")){
427
+ faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED);
428
+ } else if (faceObject.getString("obfuscationType").equals("BLURRED")){
429
+ faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.BLURRED);
430
+ } else if (faceObject.getString("obfuscationType").equals("FILLED_WHITE")){
431
+ faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED_WHITE);
432
+ }
433
+ }
403
434
  lookupBuilder.enableFacialRecognition(faceBuilder.build());
404
435
  }
405
436
  if (json.has("backgroundCheckConfiguration")) {
package/ios/UqudoId.m CHANGED
@@ -55,11 +55,14 @@ RCT_EXPORT_METHOD(enroll:(NSString *)enrollObj resolver:(RCTPromiseResolveBlock)
55
55
  [enrollmentBuilder setUserIdentifier:userID];
56
56
  }
57
57
  }
58
+ if (json[@"isReturnDataForIncompleteSession"]) {
59
+ enrollmentBuilder.returnDataForIncompleteSession = [[json valueForKey:@"isReturnDataForIncompleteSession"] boolValue];
60
+ }
58
61
  if(json[@"isAllowNonPhysicalDocuments"]){
59
62
  enrollmentBuilder.allowNonPhysicalDocuments = [[json valueForKey:@"isAllowNonPhysicalDocuments"] boolValue];
60
63
  }
61
- if (json[@"isReturnDataForIncompleteSession"]) {
62
- enrollmentBuilder.returnDataForIncompleteSession = [[json valueForKey:@"isReturnDataForIncompleteSession"] boolValue];
64
+ if (json[@"isDisableTamperingRejection"]) {
65
+ enrollmentBuilder.disableTamperingRejection = [[json valueForKey:@"isDisableTamperingRejection"] boolValue];
63
66
  }
64
67
  if (facialRecognitionSpecification) {
65
68
  // Enable help page for face recognition
@@ -87,6 +90,15 @@ RCT_EXPORT_METHOD(enroll:(NSString *)enrollObj resolver:(RCTPromiseResolveBlock)
87
90
  if (facialRecognitionSpecification[@"allowClosedEyes"]) {
88
91
  config.allowClosedEyes = [[facialRecognitionSpecification valueForKey:@"allowClosedEyes"] boolValue];
89
92
  }
93
+ if (facialRecognitionSpecification[@"obfuscationType"]) {
94
+ if ([facialRecognitionSpecification[@"obfuscationType"] isEqualToString:@"BLURRED"]) {
95
+ config.obfuscationType = BLURRED;
96
+ } else if ([facialRecognitionSpecification[@"obfuscationType"] isEqualToString:@"FILLED"]) {
97
+ config.obfuscationType = FILLED;
98
+ } else if ([facialRecognitionSpecification[@"obfuscationType"] isEqualToString:@"FILLED_WHITE"]) {
99
+ config.obfuscationType = FILLED_WHITE;
100
+ }
101
+ }
90
102
  enrollmentBuilder.facialRecognitionConfig = config;
91
103
  }
92
104
 
@@ -358,6 +370,16 @@ RCT_EXPORT_METHOD(faceSession:(NSString *)configuration resolver:(RCTPromiseReso
358
370
  if (json[@"isReturnDataForIncompleteSession"]) {
359
371
  faceSessionBuilder.returnDataForIncompleteSession = [[json valueForKey:@"isReturnDataForIncompleteSession"] boolValue];
360
372
  }
373
+ if (json[@"obfuscationType"]) {
374
+ if ([json[@"obfuscationType"] isEqualToString:@"BLURRED"]) {
375
+ [faceSessionBuilder enableAuditTrailImageObfuscation:BLURRED];
376
+ } else if ([json[@"obfuscationType"] isEqualToString:@"FILLED"]) {
377
+ [faceSessionBuilder enableAuditTrailImageObfuscation:FILLED];
378
+ } else if ([json[@"obfuscationType"] isEqualToString:@"FILLED_WHITE"]) {
379
+ [faceSessionBuilder enableAuditTrailImageObfuscation:FILLED_WHITE];
380
+ }
381
+ }
382
+
361
383
  builderController.delegate = self;
362
384
  UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController;
363
385
  builderController.appViewController = rootViewController;
@@ -462,6 +484,15 @@ RCT_EXPORT_METHOD(lookup:(NSString *)lookupObj resolver:(RCTPromiseResolveBlock)
462
484
  if (facialRecognitionSpecification[@"allowClosedEyes"]) {
463
485
  config.allowClosedEyes = [[facialRecognitionSpecification valueForKey:@"allowClosedEyes"] boolValue];
464
486
  }
487
+ if (facialRecognitionSpecification[@"obfuscationType"]) {
488
+ if ([facialRecognitionSpecification[@"obfuscationType"] isEqualToString:@"BLURRED"]) {
489
+ config.obfuscationType = BLURRED;
490
+ } else if ([facialRecognitionSpecification[@"obfuscationType"] isEqualToString:@"FILLED"]) {
491
+ config.obfuscationType = FILLED;
492
+ } else if ([facialRecognitionSpecification[@"obfuscationType"] isEqualToString:@"FILLED_WHITE"]) {
493
+ config.obfuscationType = FILLED_WHITE;
494
+ }
495
+ }
465
496
  lookupBuilder.facialRecognitionConfig = config;
466
497
 
467
498
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "uqudosdk-react-native",
3
3
  "title": "React Native UqudoId",
4
- "version": "3.0.0",
4
+ "version": "3.0.2",
5
5
  "description": "Uqudo SDK react native module",
6
6
  "main": "index.js",
7
7
  "author": {
@@ -131,10 +131,18 @@ export const AppearanceMode = Object.freeze(
131
131
  }
132
132
  );
133
133
 
134
+ export const ObfuscationType = Object.freeze(
135
+ {
136
+ FILLED: 'FILLED',
137
+ BLURRED: 'BLURRED',
138
+ FILLED_WHITE: 'FILLED_WHITE'
139
+ }
140
+ );
141
+
134
142
  export class Enrollment {
135
143
  constructor(documentList, authorizationToken, nonce,
136
144
  isRootedDeviceAllowed, isSecuredWindowsDisabled, facialRecognitionSpecification,
137
- backgroundCheckConfiguration, lookupConfiguration, sessionId, userIdentifier, isReturnDataForIncompleteSession, appearanceMode,isAllowNonPhysicalDocuments) {
145
+ backgroundCheckConfiguration, lookupConfiguration, sessionId, userIdentifier, isReturnDataForIncompleteSession, appearanceMode,isAllowNonPhysicalDocuments,isDisableTamperingRejection) {
138
146
  this.documentList = documentList;
139
147
  this.authorizationToken = authorizationToken;
140
148
  this.nonce = nonce;
@@ -148,6 +156,7 @@ export class Enrollment {
148
156
  this.isReturnDataForIncompleteSession = isReturnDataForIncompleteSession;
149
157
  this.appearanceMode = appearanceMode;
150
158
  this.isAllowNonPhysicalDocuments = isAllowNonPhysicalDocuments;
159
+ this.isDisableTamperingRejection = isDisableTamperingRejection;
151
160
  }
152
161
  }
153
162
 
@@ -163,6 +172,11 @@ export class EnrollmentBuilder {
163
172
  }
164
173
  allowNonPhysicalDocuments() {
165
174
  this.isAllowNonPhysicalDocuments = true;
175
+ return this;
176
+ }
177
+ disableTamperingRejection() {
178
+ this.isDisableTamperingRejection = true;
179
+ return this;
166
180
  }
167
181
 
168
182
  setSessionId(sessionId) {
@@ -234,7 +248,7 @@ export class EnrollmentBuilder {
234
248
  return new Enrollment(this.documentList, this.authorizationToken, this.nonce,
235
249
  this.isRootedDeviceAllowed, this.isSecuredWindowsDisabled, this.facialRecognitionSpecification,
236
250
  this.backgroundCheckConfiguration, this.lookupConfiguration, this.sessionId, this.userIdentifier, this.isReturnDataForIncompleteSession,
237
- this.appearanceMode,this.isAllowNonPhysicalDocuments);
251
+ this.appearanceMode,this.isAllowNonPhysicalDocuments,this.isDisableTamperingRejection);
238
252
  }
239
253
  }
240
254
 
@@ -273,8 +287,14 @@ export class FacialRecognitionConfigurationBuilder {
273
287
  return this;
274
288
  },
275
289
 
290
+
291
+ enableAuditTrailImageObfuscation: function (obfuscationType) {
292
+ this.obfuscationType = obfuscationType;
293
+ return this;
294
+ },
295
+
276
296
  build: function () {
277
- return new FacialRecognitionConfiguration(this.enrollFace, this.scanMinimumMatchLevel, this.readMinimumMatchLevel, this.lookupMinimumMatchLevel, this.maxAttempts,this.isAllowClosedEyes);
297
+ return new FacialRecognitionConfiguration(this.enrollFace, this.scanMinimumMatchLevel, this.readMinimumMatchLevel, this.lookupMinimumMatchLevel, this.maxAttempts,this.isAllowClosedEyes,this.obfuscationType);
278
298
  }
279
299
  };
280
300
  }
@@ -282,13 +302,14 @@ export class FacialRecognitionConfigurationBuilder {
282
302
 
283
303
 
284
304
  export class FacialRecognitionConfiguration {
285
- constructor(enrollFace, scanMinimumMatchLevel, readMinimumMatchLevel, lookupMinimumMatchLevel, maxAttempts,isAllowClosedEyes) {
305
+ constructor(enrollFace, scanMinimumMatchLevel, readMinimumMatchLevel, lookupMinimumMatchLevel, maxAttempts,isAllowClosedEyes,obfuscationType) {
286
306
  this.enrollFace = enrollFace;
287
307
  this.scanMinimumMatchLevel = scanMinimumMatchLevel;
288
308
  this.readMinimumMatchLevel = readMinimumMatchLevel;
289
309
  this.lookupMinimumMatchLevel = lookupMinimumMatchLevel;
290
310
  this.maxAttempts = maxAttempts;
291
311
  this.allowClosedEyes = isAllowClosedEyes;
312
+ this.obfuscationType = obfuscationType;
292
313
  }
293
314
  }
294
315
 
@@ -637,17 +658,22 @@ export class FaceSessionBuilder {
637
658
  this.appearanceMode = appearanceMode;
638
659
  return this;
639
660
  },
661
+
662
+ enableAuditTrailImageObfuscation: function (obfuscationType) {
663
+ this.obfuscationType = obfuscationType;
664
+ return this;
665
+ },
640
666
 
641
667
 
642
668
  build: function () {
643
- return new FaceSessionConfiguration(this.authorizationToken, this.sessionId, this.nonce, this.isRootedDeviceAllowed, this.isSecuredWindowsDisabled, this.minimumMatchLevel, this.maxAttempts, this.isReturnDataForIncompleteSession, this.appearanceMode,this.isAllowClosedEyes);
669
+ return new FaceSessionConfiguration(this.authorizationToken, this.sessionId, this.nonce, this.isRootedDeviceAllowed, this.isSecuredWindowsDisabled, this.minimumMatchLevel, this.maxAttempts, this.isReturnDataForIncompleteSession, this.appearanceMode,this.isAllowClosedEyes,this.obfuscationType);
644
670
  }
645
671
  }
646
672
  }
647
673
  }
648
674
 
649
675
  export class FaceSessionConfiguration {
650
- constructor(token, sessionId, nonce, isRootedDeviceAllowed, isSecuredWindowsDisabled, minimumMatchLevel,maxAttempts,isReturnDataForIncompleteSession,appearanceMode,isAllowClosedEyes) {
676
+ constructor(token, sessionId, nonce, isRootedDeviceAllowed, isSecuredWindowsDisabled, minimumMatchLevel,maxAttempts,isReturnDataForIncompleteSession,appearanceMode,isAllowClosedEyes,obfuscationType) {
651
677
  this.token = token;
652
678
  this.sessionId = sessionId;
653
679
  this.nonce = nonce;
@@ -658,6 +684,7 @@ export class FaceSessionConfiguration {
658
684
  this.isReturnDataForIncompleteSession = isReturnDataForIncompleteSession;
659
685
  this.appearanceMode = appearanceMode;
660
686
  this.allowClosedEyes = isAllowClosedEyes;
687
+ this.obfuscationType = obfuscationType;
661
688
  }
662
689
  }
663
690
 
@@ -13,5 +13,5 @@ Pod::Spec.new do |s|
13
13
  s.source = { :http => 'https://uqudo.com' }
14
14
  s.header_dir = 'UqudoSDK'
15
15
  s.dependency 'React'
16
- s.dependency 'UqudoSDK', '3.0.0'
16
+ s.dependency 'UqudoSDK', '3.0.2'
17
17
  end