private static AssertionConsumerService buildAssertionConsumerServiceElement( SamlAssertionConsumerConfig config, SamlPortConfig portConfig, String hostname, int index) { final AssertionConsumerService consumer = build(AssertionConsumerService.DEFAULT_ELEMENT_NAME); consumer.setLocation(config.endpoint().toUriString(portConfig.scheme().uriText(), hostname, portConfig.port())); consumer.setBinding(config.endpoint().bindingProtocol().urn()); consumer.setIndex(index); // Add 'isDefault' attribute only when told so. if (config.isDefault()) { consumer.setIsDefault(true); } return consumer; }
protected AssertionConsumerService getAssertionConsumerService(final String binding, final int index, final boolean isDefault) { final SAMLObjectBuilder<AssertionConsumerService> builder = (SAMLObjectBuilder<AssertionConsumerService>) this.builderFactory .getBuilder(AssertionConsumerService.DEFAULT_ELEMENT_NAME); final AssertionConsumerService consumer = builder.buildObject(); consumer.setLocation(this.assertionConsumerServiceUrl); consumer.setBinding(binding); if (isDefault) { consumer.setIsDefault(true); } consumer.setIndex(index); return consumer; }
public AssertionConsumerService getAssertionConsumerService(Endpoint endpoint, int index) { SAMLObjectBuilder<AssertionConsumerService> builder = (SAMLObjectBuilder<AssertionConsumerService>) getBuilderFactory() .getBuilder(AssertionConsumerService.DEFAULT_ELEMENT_NAME); AssertionConsumerService consumer = builder.buildObject(); consumer.setLocation(endpoint.getLocation()); consumer.setBinding(endpoint.getBinding().toString()); consumer.setIsDefault(endpoint.isDefault()); consumer.setIndex(index); return consumer; }
acs.setLocation(foundAcs.getLocation()); acs.setResponseLocation(foundAcs.getResponseLocation()); acs.setIndex(acsIndex); }); } else { acs.setLocation(authnRequest.getAssertionConsumerServiceURL()); acs.setResponseLocation(authnRequest.getAssertionConsumerServiceURL()); acs.setIndex(0); acs.setIsDefault(Boolean.TRUE);
assertionConsumerServiceBuilder.buildObject(); assertionConsumerService.setBinding(REDIRECT_BINDING); assertionConsumerService.setIndex(acsIndex++); assertionConsumerService.setLocation(assertionConsumerServiceLocationRedirect); spSsoDescriptor.getAssertionConsumerServices().add(assertionConsumerService); assertionConsumerServiceBuilder.buildObject(); assertionConsumerService.setBinding(POST_BINDING); assertionConsumerService.setIndex(acsIndex++); assertionConsumerService.setLocation(assertionConsumerServiceLocationPost); spSsoDescriptor.getAssertionConsumerServices().add(assertionConsumerService); assertionConsumerServiceBuilder.buildObject(); assertionConsumerServicePaos.setBinding(PAOS_BINDING); assertionConsumerServicePaos.setIndex(acsIndex); assertionConsumerServicePaos.setLocation(assertionConsumerServiceLocationPaos); spSsoDescriptor.getAssertionConsumerServices().add(assertionConsumerServicePaos);
private static AssertionConsumerService buildAssertionConsumerServiceElement( SamlAssertionConsumerConfig config, SamlPortConfig portConfig, String hostname, int index) { final AssertionConsumerService consumer = build(AssertionConsumerService.DEFAULT_ELEMENT_NAME); consumer.setLocation(config.endpoint().toUriString(portConfig.scheme().uriText(), hostname, portConfig.port())); consumer.setBinding(config.endpoint().bindingProtocol().urn()); consumer.setIndex(index); // Add 'isDefault' attribute only when told so. if (config.isDefault()) { consumer.setIsDefault(true); } return consumer; }
assertionConsumerService.setIndex(bindingType.ordinal()); assertionConsumerService.setBinding(bindingType.getUri()); assertionConsumerService.setLocation(getAssertionConsumerURL(spEntityID, urlContext));