Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ If you are using Maven, you need to add the following dependency:
<dependency>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-api</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
</dependency>
```

If you are using Gradle, here is the dependency to add:

`compile group: 'com.yoti', name: 'yoti-sdk-api', version: '4.2.0'`
`compile group: 'com.yoti', name: 'yoti-sdk-api', version: '4.3.0-SNAPSHOT'`

You will find all classes packaged under `com.yoti.api`

Expand Down
2 changes: 1 addition & 1 deletion examples/doc-scan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-api</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk</artifactId>
<packaging>pom</packaging>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
<name>Yoti SDK</name>
<description>Java SDK for simple integration with the Yoti platform</description>
<url>https://github.com/getyoti/yoti-java-sdk</url>
Expand Down
2 changes: 1 addition & 1 deletion yoti-sdk-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-parent</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath>../yoti-sdk-parent</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public class SdkConfig {
@JsonProperty("allow_handoff")
private final Boolean allowHandoff;

@JsonProperty("enforce_handoff")
private final Boolean enforceHandoff;

@JsonProperty("attempts_configuration")
private final AttemptsConfiguration attemptsConfiguration;

Expand All @@ -72,6 +75,7 @@ private SdkConfig(String allowedCaptureMethods,
String errorUrl,
String privacyPolicyUrl,
Boolean allowHandoff,
Boolean enforceHandoff,
AttemptsConfiguration attemptsConfiguration,
String brandId,
String biometricConsentFlow,
Expand All @@ -88,6 +92,7 @@ private SdkConfig(String allowedCaptureMethods,
this.errorUrl = errorUrl;
this.privacyPolicyUrl = privacyPolicyUrl;
this.allowHandoff = allowHandoff;
this.enforceHandoff = enforceHandoff;
this.attemptsConfiguration = attemptsConfiguration;
this.brandId = brandId;
this.biometricConsentFlow = biometricConsentFlow;
Expand Down Expand Up @@ -206,6 +211,15 @@ public Boolean getAllowHandoff() {
return allowHandoff;
}

/**
* If mobile handoff is enforced in the session
*
* @return if mobile handoff is enforced
*/
public Boolean getEnforceHandoff() {
return enforceHandoff;
}

/**
* The number of allowed attempts for certain tasks
*
Expand Down Expand Up @@ -259,6 +273,7 @@ public static class Builder {
private String errorUrl;
private String privacyPolicyUrl;
private Boolean allowHandoff;
private Boolean enforceHandoff;
private AttemptsConfiguration attemptsConfiguration;
private String brandId;
private String biometricConsentFlow;
Expand Down Expand Up @@ -444,6 +459,17 @@ public Builder withAllowHandoff(boolean allowHandoff) {
return this;
}

/**
* Sets if the user is required to perform mobile handoff
*
* @param enforceHandoff if mobile handoff is enforced
* @return the builder
*/
public Builder withEnforceHandoff(boolean enforceHandoff) {
this.enforceHandoff = enforceHandoff;
return this;
}

/**
* Sets the {@link AttemptsConfiguration} for any Text Extractions Tasks
*
Expand Down Expand Up @@ -528,6 +554,7 @@ public SdkConfig build() {
errorUrl,
privacyPolicyUrl,
allowHandoff,
enforceHandoff,
attemptsConfiguration,
brandId,
biometricConsentFlow,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private YotiConstants() {}
public static final String CONTENT_TYPE_JPEG = "image/jpeg";

public static final String JAVA = "Java";
public static final String SDK_VERSION = JAVA + "-4.2.0";
public static final String SDK_VERSION = JAVA + "-4.3.0-SNAPSHOT";
public static final String SIGNATURE_ALGORITHM = "SHA256withRSA";
public static final String ASYMMETRIC_CIPHER = "RSA/NONE/PKCS1Padding";
public static final String SYMMETRIC_CIPHER = "AES/CBC/PKCS7Padding";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void shouldBuildSimpleSdkConfigWithAllOptions() {
.withErrorUrl(SOME_ERROR_URL)
.withPrivacyPolicyUrl(SOME_PRIVACY_POLICY_URL)
.withAllowHandoff(true)
.withEnforceHandoff(true)
.withAttemptsConfiguration(attemptsConfigurationMock)
.withBrandId(SOME_BRAND_ID)
.withSuppressedScreen(SOME_SUPPRESSED_SCREEN)
Expand All @@ -64,6 +65,7 @@ public void shouldBuildSimpleSdkConfigWithAllOptions() {
assertThat(result.getErrorUrl(), is(SOME_ERROR_URL));
assertThat(result.getPrivacyPolicyUrl(), is(SOME_PRIVACY_POLICY_URL));
assertThat(result.getAllowHandoff(), is(true));
assertThat(result.getEnforceHandoff(), is(true));
assertThat(result.getAttemptsConfiguration(), is(attemptsConfigurationMock));
assertThat(result.getBrandId(), is(SOME_BRAND_ID));
assertThat(result.getSuppressedScreens(), hasSize(2));
Expand All @@ -78,6 +80,14 @@ public void allowHandoff_shouldBeNullWhenNotSet() {
assertThat(result.getAllowHandoff(), is(nullValue()));
}

@Test
public void enforceHandoff_shouldBeNullWhenNotSet() {
SdkConfig result = SdkConfig.builder()
.build();

assertThat(result.getEnforceHandoff(), is(nullValue()));
}

@Test
public void shouldBuildSimpleSdkConfigWithOnlyCamera() {
SdkConfig result = SdkConfig.builder()
Expand Down
2 changes: 1 addition & 1 deletion yoti-sdk-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-parent</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath>../yoti-sdk-parent</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion yoti-sdk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-parent</artifactId>
<packaging>pom</packaging>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
<name>Yoti SDK Parent Pom</name>
<description>Parent pom for the Java SDK projects</description>
<url>https://github.com/getyoti/yoti-java-sdk</url>
Expand Down
2 changes: 1 addition & 1 deletion yoti-sdk-sandbox/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-parent</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath>../yoti-sdk-parent</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions yoti-sdk-spring-boot-auto-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ If you are using Maven, you need to add the following dependencies:
<dependency>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-spring-boot-auto-config</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
</dependency>
```


If you are using Gradle, here is the dependency to add:

```
compile group: 'com.yoti', name: 'yoti-sdk-spring-boot-auto-config', version: '4.2.0'
compile group: 'com.yoti', name: 'yoti-sdk-spring-boot-auto-config', version: '4.3.0-SNAPSHOT'
```


Expand Down
2 changes: 1 addition & 1 deletion yoti-sdk-spring-boot-auto-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-parent</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath>../yoti-sdk-parent</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion yoti-sdk-spring-boot-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Note that:
<dependency>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-api</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion yoti-sdk-spring-boot-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-spring-boot-example</artifactId>
<name>Yoti Spring Boot Example</name>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>

<parent>
<groupId>org.springframework.boot</groupId>
Expand Down
4 changes: 2 additions & 2 deletions yoti-sdk-spring-security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ If you are using Maven, you need to add the following dependencies:
<dependency>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-spring-security</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
</dependency>
```

If you are using Gradle, here is the dependency to add:

```
compile group: 'com.yoti', name: 'yoti-sdk-spring-security', version: '4.2.0'
compile group: 'com.yoti', name: 'yoti-sdk-spring-security', version: '4.3.0-SNAPSHOT'
```

### Provide a `YotiClient` instance
Expand Down
2 changes: 1 addition & 1 deletion yoti-sdk-spring-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>com.yoti</groupId>
<artifactId>yoti-sdk-parent</artifactId>
<version>4.2.0</version>
<version>4.3.0-SNAPSHOT</version>
<relativePath>../yoti-sdk-parent</relativePath>
</parent>

Expand Down
Loading