Factor out LogoutInitiator class, simpler API to get ACS by binding.
[shibboleth/sp.git] / shibsp / handler / impl / WAYFSessionInitiator.cpp
index 160000d..534a311 100644 (file)
@@ -124,12 +124,20 @@ pair<bool,long> WAYFSessionInitiator::run(SPRequest& request, string& entityID,
     
     // Since we're not passing by index, we need to fully compute the return URL.
     if (!ACS) {
+        // Try fixed index property, or incoming binding set, or default, in order.
         pair<bool,unsigned int> 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<string>::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();
     }