Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Sep 10, 2024
1 parent a9aa5e0 commit a71849a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,15 @@ public void createConnectWithoutInteraction(Map<String, String> connectionData,
boolean connectWithoutInteraction = StringUtils.hasText(dashboardConnectType) &&
DashboardConnectOption.fromType(dashboardConnectType).connectWithoutInteraction();

Object idpInstitutionId = idp.metaDataFields().get("coin:institution_id");
Object spInstitutionId = sp.metaDataFields().get("coin:institution_id");
Object idpInstitutionId = idp.metaDataFields().get("coin:institution_guid");
Object spInstitutionId = sp.metaDataFields().get("coin:institution_guid");
boolean shareInstitutionId = idpInstitutionId != null && idpInstitutionId.equals(spInstitutionId) &&
!"connect_with_interaction".equals(dashboardConnectType);
if (!connectWithoutInteraction && !shareInstitutionId) {
throw new EndpointNotAllowed(
String.format("SP %s does not allow an automatic connection with IdP %s. " +
String.format("%s %s does not allow an automatic connection with IdP %s. " +
"SP dashboardConnectType: %s, idpInstitutionId: %s, spInstitutionId %s",
spEntityId, idpEntityId, dashboardConnectType, idpInstitutionId, spInstitutionId));
spType, spEntityId, idpEntityId, dashboardConnectType, idpInstitutionId, spInstitutionId));
}

addAllowedEntity(sp, idpEntityId, connectionData, apiUser, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ public void connectValidSpWithoutInteraction() {
}

@Test
public void connectSpWithSameInstitutionIdAsIdp() {
public void connectSpWithSameInstitutionGUIDAsIdp() {
String idpEntityId = "https://idp.test2.surfconext.nl";
String idUId = "6";
String rpId = "https@//oidc.rp";
Expand Down
2 changes: 1 addition & 1 deletion manage-server/src/test/resources/json/meta_data_seed.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
"refreshTokenValidity": 3600,
"coin:stepup:requireloa": "http://test.surfconext.nl/assurance/loa3",
"coin:stepup:allow_no_token": true,
"coin:institution_guid": "8D64131A-5ABA-4223-9E8D-DF7B8C516CE8"
"coin:institution_guid": "219092BE-B234-4C17-B910-B090C19CE3DB"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
"disable_scoping": "1",
"guest_qualifier": "All",
"hidden": "1",
"institution_id": "123",
"institution_guid": "219092BE-B234-4C17-B910-B090C19CE3DB",
"publish_in_edugain": "1",
"publish_in_edugain_date": "2018-06-15T08:20:34.575Z",
"schachomeorganization": "schac_home"
Expand Down Expand Up @@ -662,7 +662,7 @@
}
],
"coin": {
"institution_id": "123",
"institution_guid": "219092BE-B234-4C17-B910-B090C19CE3DB",
"stepup": {
"allow_no_token": "1",
"requireloa": "http://test.surfconext.nl/assurance/loa3"
Expand Down

0 comments on commit a71849a

Please sign in to comment.