if (index.equals(service.getIndex())) {
logger.debug("Found assertionConsumerService with index {} and binding {}", index, service.getBinding());
return service;
}
}
throw new SAMLRuntimeException("AssertionConsumerService with index " + index + " wasn't found for ServiceProvider " + ssoDescriptor.getID() + ", please check your metadata");
}
logger.debug("Index for AssertionConsumerService not specified, returning default");
return ssoDescriptor.getDefaultAssertionConsumerService();
}