Skip to content

Commit 4ac8c02

Browse files
committed
Reverted to eduID only scoping
1 parent f7dc8fe commit 4ac8c02

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

server/src/main/java/invite/security/AuthorizationRequestCustomizer.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,7 @@ public void accept(OAuth2AuthorizationRequest.Builder builder) {
5555
boolean guestInvitation = invitation.getIntendedAuthority().equals(Authority.GUEST);
5656
if (invitation.isEduIDOnly() && guestInvitation) {
5757
params.put("login_hint", eduidEntityId);
58-
} else if (!invitation.isEduIDOnly() && guestInvitation) {
59-
//Fetch all IdentityProviders that have one the manage role applications in their allowList
60-
// First, get all entity identifiers of the applications connected to the roles of the invitation
61-
List<String> entityIdentifiers = invitation.getRoles().stream()
62-
.map(role -> role.getRole().getApplicationUsages())
63-
.flatMap(Collection::stream)
64-
.map(applicationUsage -> applicationUsage.getApplication())
65-
.map(application -> manage.providerById(application.getManageType(), application.getManageId()))
66-
.map(provider -> (String) ((Map) provider.get("data")).get("entityid"))
67-
.distinct()
68-
.toList();
69-
//Now get all entityIdentifiers of the IdP's
70-
List<String> idpList = manage.idpEntityIdentifiersByServiceEntityId(entityIdentifiers);
71-
params.put("login_hint", idpList.stream().collect(Collectors.joining(",")));
72-
}
58+
}
7359
});
7460
}
7561
});

0 commit comments

Comments
 (0)