Skip to content

Commit

Permalink
[SHIBUI-1226]
Browse files Browse the repository at this point in the history
implement updates for logout endpoints
  • Loading branch information
jj committed Feb 13, 2019
1 parent 0d115f9 commit 370c88b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ private EntityDescriptor buildDescriptorFromRepresentation(final EntityDescripto

// setup logout
if (representation.getLogoutEndpoints() != null && !representation.getLogoutEndpoints().isEmpty()) {
// TODO: review if we need more than a naive implementation
getOptionalSPSSODescriptorFromEntityDescriptor(ed).ifPresent(spssoDescriptor -> spssoDescriptor.getSingleLogoutServices().clear());
for (LogoutEndpointRepresentation logoutEndpointRepresentation : representation.getLogoutEndpoints()) {
SingleLogoutService singleLogoutService = openSamlObjects.buildDefaultInstanceOfType(SingleLogoutService.class);
singleLogoutService.setBinding(logoutEndpointRepresentation.getBindingType());
Expand All @@ -294,7 +296,7 @@ private EntityDescriptor buildDescriptorFromRepresentation(final EntityDescripto
getSPSSODescriptorFromEntityDescriptor(ed).getSingleLogoutServices().add(singleLogoutService);
}
} else {
// TODO: implement
getOptionalSPSSODescriptorFromEntityDescriptor(ed).ifPresent(spssoDescriptor -> spssoDescriptor.getSingleLogoutServices().clear());
}

if (representation.getRelyingPartyOverrides() != null || (representation.getAttributeRelease() != null && representation.getAttributeRelease().size() > 0)) {
Expand Down

0 comments on commit 370c88b

Please sign in to comment.