final List<AssertionConsumerService> services = spSsoDescriptor.getAssertionConsumerServices(); for (final SamlAssertionConsumerConfig acs : assertionConsumerConfigs) { services.add(buildAssertionConsumerServiceElement(acs, portConfig, defaultHostname, acsIndex++));
assertThat(slo.get(1).getBinding()).isEqualTo(SAMLConstants.SAML2_REDIRECT_BINDING_URI); final List<AssertionConsumerService> acs = sp.getAssertionConsumerServices();
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { SPSSODescriptor descriptor = (SPSSODescriptor) parentSAMLObject; if (childSAMLObject instanceof AssertionConsumerService) { descriptor.getAssertionConsumerServices().add((AssertionConsumerService) childSAMLObject); } else if (childSAMLObject instanceof AttributeConsumingService) { descriptor.getAttributeConsumingServices().add((AttributeConsumingService) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
/** Does the {@link EntityDescriptor} have a {@link MetadataServiceRegistry#PROXY_BINDING} acs. * @param entity what to look at * @return Whether is is authorized to proxy */ private boolean isAuthorizedToProxy(@Nonnull final EntityDescriptor entity) { final SPSSODescriptor descriptor = entity.getSPSSODescriptor(AbstractProtocolConfiguration.PROTOCOL_URI); if (descriptor != null) { for (final AssertionConsumerService acs : descriptor.getAssertionConsumerServices()) { if (PROXY_BINDING.equals(acs.getBinding())) { return true; } } } return false; }
public final AssertionConsumerService getSPAssertionConsumerService(final String acsIndex) { final SPSSODescriptor spssoDescriptor = getSPSSODescriptor(); final List<AssertionConsumerService> services = spssoDescriptor.getAssertionConsumerServices(); // Get by index if (acsIndex != null) { for (final AssertionConsumerService service : services) { if (Integer.valueOf(acsIndex).equals(service.getIndex())) { return service; } } throw new SAMLException("Assertion consumer service with index " + acsIndex + " could not be found for spDescriptor " + spssoDescriptor); } // Get default if (spssoDescriptor.getDefaultAssertionConsumerService() != null) { return spssoDescriptor.getDefaultAssertionConsumerService(); } // Get first if (!services.isEmpty()) { return services.iterator().next(); } throw new SAMLException("No assertion consumer services could be found for " + spssoDescriptor); }
final List<AssertionConsumerService> services = spSsoDescriptor.getAssertionConsumerServices(); for (final SamlAssertionConsumerConfig acs : assertionConsumerConfigs) { services.add(buildAssertionConsumerServiceElement(acs, portConfig, defaultHostname, acsIndex++));
assertionConsumerService.setIndex(acsIndex++); assertionConsumerService.setLocation(assertionConsumerServiceLocationRedirect); spSsoDescriptor.getAssertionConsumerServices().add(assertionConsumerService); assertionConsumerService.setIndex(acsIndex++); assertionConsumerService.setLocation(assertionConsumerServiceLocationPost); spSsoDescriptor.getAssertionConsumerServices().add(assertionConsumerService); assertionConsumerServicePaos.setIndex(acsIndex); assertionConsumerServicePaos.setLocation(assertionConsumerServiceLocationPaos); spSsoDescriptor.getAssertionConsumerServices().add(assertionConsumerServicePaos);
it.forEach(entityDescriptor -> { val spssoDescriptor = entityDescriptor.getSPSSODescriptor(SAMLConstants.SAML20P_NS); val acsEndpoints = spssoDescriptor.getAssertionConsumerServices(); if (acsEndpoints.isEmpty()) { throw new IllegalArgumentException("Metadata resolved for entity id " + issuer + " has no defined ACS endpoints");
spDescriptor.getAssertionConsumerServices() .add(getAssertionConsumerService(SAMLConstants.SAML2_POST_BINDING_URI, index++, this.defaultACSIndex == index)); spDescriptor.getSingleLogoutServices().add(getSingleLogoutService(SAMLConstants.SAML2_POST_BINDING_URI));
descriptor.getAssertionConsumerServices().add(getAssertionConsumerService(ep, i));
assertionConsumerService.setBinding(bindingType.getUri()); assertionConsumerService.setLocation(getAssertionConsumerURL(spEntityID, urlContext)); spSSODescriptor.getAssertionConsumerServices().add(assertionConsumerService); spEntityDescriptor.getRoleDescriptors().add(spSSODescriptor);
provider.setAuthnRequestsSigned(desc.isAuthnRequestsSigned()); provider.setWantAssertionsSigned(desc.getWantAssertionsSigned()); provider.setAssertionConsumerService(getEndpoints(desc.getAssertionConsumerServices())); provider.setRequestedAttributes(getRequestAttributes(desc)); provider.setKeys(getProviderKeys(descriptor));