@@ -45,6 +45,9 @@ public class SdkConfig {
45
45
@ JsonProperty (Property .BRAND_ID )
46
46
private final String brandId ;
47
47
48
+ @ JsonProperty (Property .BIOMETRIC_CONSENT_FLOW )
49
+ private final String biometricConsentFlow ;
50
+
48
51
SdkConfig (String allowedCaptureMethods ,
49
52
String primaryColour ,
50
53
String secondaryColour ,
@@ -55,7 +58,9 @@ public class SdkConfig {
55
58
String errorUrl ,
56
59
String privacyPolicyUrl ,
57
60
Boolean allowHandoff ,
58
- AttemptsConfiguration attemptsConfiguration , String brandId ) {
61
+ AttemptsConfiguration attemptsConfiguration ,
62
+ String brandId ,
63
+ String biometricConsentFlow ) {
59
64
this .allowedCaptureMethods = allowedCaptureMethods ;
60
65
this .primaryColour = primaryColour ;
61
66
this .secondaryColour = secondaryColour ;
@@ -68,6 +73,7 @@ public class SdkConfig {
68
73
this .allowHandoff = allowHandoff ;
69
74
this .attemptsConfiguration = attemptsConfiguration ;
70
75
this .brandId = brandId ;
76
+ this .biometricConsentFlow = biometricConsentFlow ;
71
77
}
72
78
73
79
public static SdkConfig .Builder builder () {
@@ -182,6 +188,15 @@ public String getBrandId() {
182
188
return brandId ;
183
189
}
184
190
191
+ /**
192
+ * The configured biometric consent flow for the session
193
+ *
194
+ * @return the configured biometric consent flow
195
+ */
196
+ public String getBiometricConsentFlow () {
197
+ return biometricConsentFlow ;
198
+ }
199
+
185
200
/**
186
201
* Builder to assist in the creation of {@link SdkConfig}.
187
202
*/
@@ -199,6 +214,7 @@ public static class Builder {
199
214
private Boolean allowHandoff ;
200
215
private AttemptsConfiguration attemptsConfiguration ;
201
216
private String brandId ;
217
+ private String biometricConsentFlow ;
202
218
203
219
private Builder () {}
204
220
@@ -352,6 +368,35 @@ public Builder withBrandId(String brandId) {
352
368
return this ;
353
369
}
354
370
371
+ /**
372
+ * Sets the Biometric Consent Flow for the session
373
+ *
374
+ * @param biometricConsentFlow the biometric consent flow
375
+ * @return the builder
376
+ */
377
+ public Builder withBiometricConsentFlow (String biometricConsentFlow ) {
378
+ this .biometricConsentFlow = biometricConsentFlow ;
379
+ return this ;
380
+ }
381
+
382
+ /**
383
+ * Sets the biometric consent flow to EAGER for the session
384
+ *
385
+ * @return the builder
386
+ */
387
+ public Builder withBiometricConsentFlowEager () {
388
+ return withBiometricConsentFlow (DocScanConstants .EAGER );
389
+ }
390
+
391
+ /**
392
+ * Sets the biometric consent flow to JUST_IN_TIME for the session
393
+ *
394
+ * @return the builder
395
+ */
396
+ public Builder withBiometricConsentFlowJustInTime () {
397
+ return withBiometricConsentFlow (DocScanConstants .JUST_IN_TIME );
398
+ }
399
+
355
400
/**
356
401
* Builds the {@link SdkConfig} using the values supplied to the builder
357
402
*
@@ -370,7 +415,8 @@ public SdkConfig build() {
370
415
privacyPolicyUrl ,
371
416
allowHandoff ,
372
417
attemptsConfiguration ,
373
- brandId
418
+ brandId ,
419
+ biometricConsentFlow
374
420
);
375
421
}
376
422
}
@@ -389,6 +435,7 @@ private static final class Property {
389
435
private static final String ALLOW_HANDOFF = "allow_handoff" ;
390
436
private static final String ATTEMPTS_CONFIGURATION = "attempts_configuration" ;
391
437
private static final String BRAND_ID = "brand_id" ;
438
+ private static final String BIOMETRIC_CONSENT_FLOW = "biometric_consent_flow" ;
392
439
393
440
private Property () {}
394
441
0 commit comments