X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2Fhandler%2Fimpl%2FSAML2SessionInitiator.cpp;h=9707700597b853d423e76527aff2d34908c0cf2e;hb=774d366fe1303f7cb07b8caa26338ab3c98c7fb7;hp=17056a27e420e77c499752114efc44a9eeeb7662;hpb=8d742a1e1f479f74eafd6f60e21c5f9f329a924b;p=shibboleth%2Fcpp-sp.git diff --git a/shibsp/handler/impl/SAML2SessionInitiator.cpp b/shibsp/handler/impl/SAML2SessionInitiator.cpp index 17056a2..9707700 100644 --- a/shibsp/handler/impl/SAML2SessionInitiator.cpp +++ b/shibsp/handler/impl/SAML2SessionInitiator.cpp @@ -42,7 +42,7 @@ using namespace opensaml::saml2p; using namespace opensaml::saml2md; #else # include "lite/SAMLConstants.h" -#include +# include #endif using namespace shibsp; @@ -310,18 +310,25 @@ pair SAML2SessionInitiator::run(SPRequest& request, string& entityID, if (!ACS) { if (ECP) { - const vector& handlers = app.getAssertionConsumerServicesByBinding(m_paosBinding.get()); - if (handlers.empty()) + ACS = app.getAssertionConsumerServiceByBinding(samlconstants::SAML20_BINDING_PAOS); + if (!ACS) throw ConfigurationException("Unable to locate PAOS response endpoint."); - ACS = handlers.front(); } else { + // Try fixed index property, or incoming binding set, or default, in order. pair index = getUnsignedInt("acsIndex", request, HANDLER_PROPERTY_MAP|HANDLER_PROPERTY_FIXED); if (index.first) { ACS = app.getAssertionConsumerServiceByIndex(index.second); if (!ACS) request.log(SPRequest::SPWarn, "invalid acsIndex property, using default ACS location"); } + /* + for (vector::const_iterator b = m_incomingBindings.begin(); !ACS && b != m_incomingBindings.end(); ++b) { + ACS = app.getAssertionConsumerServiceByBinding(b->c_str()); + if (ACS && !XMLString::equals(getProtocolFamily(), ACS->getProtocolFamily())) + ACS = nullptr; + } + */ if (!ACS) ACS = app.getDefaultAssertionConsumerService(); }