assertThat(slo.get(0).getLocation()) .isEqualTo("http://" + spHostname + ':' + rule.httpPort() + "/saml/slo/post"); assertThat(slo.get(0).getBinding()).isEqualTo(SAMLConstants.SAML2_POST_BINDING_URI); assertThat(slo.get(1).getLocation()) .isEqualTo("http://" + spHostname + ':' + rule.httpPort() + "/saml/slo/redirect"); assertThat(slo.get(1).getBinding()).isEqualTo(SAMLConstants.SAML2_REDIRECT_BINDING_URI);
/** * Gets single logout service for the requested binding. * * @param binding the binding * @return the single logout service or null */ public SingleLogoutService getSingleLogoutService(final String binding) { return getSingleLogoutServices().stream().filter(acs -> acs.getBinding().equals(binding)).findFirst().orElse(null); }
public final SingleLogoutService getIDPSingleLogoutService(final String binding) { final List<SingleLogoutService> services = getIDPSSODescriptor().getSingleLogoutServices(); for (final SingleLogoutService service : services) { if (service.getBinding().equals(binding)) { return service; } } throw new SAMLException("Identity provider has no single logout service available for the selected profile" + binding); }
private static SingleLogoutUrl finalizeSingleLogoutUrl(final SingleLogoutService sloService, final SamlRegisteredService service) { val location = StringUtils.isBlank(sloService.getResponseLocation()) ? sloService.getLocation() : sloService.getResponseLocation(); val url = new SingleLogoutUrl(location, service.getLogoutType()); url.getProperties().put(PROPERTY_NAME_SINGLE_LOGOUT_BINDING, sloService.getBinding()); return url; } }
id, slo.getBinding(), slo.getLocation(), slo.getResponseLocation()); this.sloBindings.put(slo.getBinding(), slo); });