Skip to content

Commit

Permalink
Sso migration data (#130)
Browse files Browse the repository at this point in the history
* Add SSO migration url and entity

* Bump version

* remove comments

---------

Co-authored-by: Doron Sharon <[email protected]>
  • Loading branch information
slavikm and dorsha authored Oct 29, 2024
1 parent 5bdc55d commit c809681
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/management-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>com.descope</groupId>
<artifactId>java-sdk</artifactId>
<version>1.0.27</version>
<version>1.0.30</version>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.descope</groupId>
<artifactId>java-sdk</artifactId>
<modelVersion>4.0.0</modelVersion>
<version>1.0.29</version>
<version>1.0.30</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Java library used to integrate with Descope.</description>
<url>https://github.com/descope/descope-java</url>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/descope/model/sso/SSOSAMLSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ public class SSOSAMLSettings {
private String spEncryptionKey;
private String spSignKey;
private String subjectNameIdFormat;
// NOTICE - the following fields should be overridden only in case of SSO migration,
// otherwise, do not modify these fields
private String spACSUrl;
private String spEntityId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ public class SSOSAMLSettingsByMetadata {
private String spEncryptionKey;
private String spSignKey;
private String subjectNameIdFormat;
// NOTICE - the following fields should be overridden only in case of SSO migration,
// otherwise, do not modify these fields
private String spACSUrl;
private String spEntityId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ void testFunctionalFullCycleSAML() {
.spEncryptionKey(TestUtils.MOCK_PRIVATE_KEY_STRING)
.spSignKey(TestUtils.MOCK_PRIVATE_KEY_STRING)
.subjectNameIdFormat(unspecifiedFormat)
.spACSUrl("https://spacsurl.com")
.spEntityId("spEntityId")
.build(), "https://" + name + ".com", null);
SSOTenantSettingsResponse resp = ssoService.loadSettings(tenantId);
assertEquals(tenantId, resp.getTenant().getId());
Expand All @@ -307,6 +309,8 @@ void testFunctionalFullCycleSAML() {
assertThat(signCert).isNotBlank();
assertThat(newSignCert).isNotEqualTo(signCert);
assertThat(unspecifiedFormat).isEqualTo(resp.getSaml().getSubjectNameIdFormat());
assertEquals("https://spacsurl.com", resp.getSaml().getSpACSUrl());
assertEquals("spEntityId", resp.getSaml().getSpEntityId());
ssoService.deleteSettings(tenantId);
tenantService.delete(tenantId);
}
Expand Down

0 comments on commit c809681

Please sign in to comment.