zoom: handle contentAuthentication MP-587
[metaproxy-moved-to-github.git] / src / filter_zoom.cpp
index f2d7127..8ca763b 100644 (file)
@@ -62,6 +62,7 @@ namespace metaproxy_1 {
           public:
             std::string authentication;
             std::string authenticationMode;
+            std::string contentAuthentication;
             std::string cfAuth;
             std::string cfProxy;
             std::string cfSubDB;
@@ -594,6 +595,11 @@ yf::Zoom::SearchablePtr yf::Zoom::Impl::parse_torus_record(const xmlNode *ptr)
             s->authenticationMode = mp::xml::get_text(ptr);
         }
         else if (!strcmp((const char *) ptr->name,
+                         "contentAuthentication"))
+        {
+            s->contentAuthentication = mp::xml::get_text(ptr);
+        }
+        else if (!strcmp((const char *) ptr->name,
                          "cfAuth"))
         {
             s->cfAuth = mp::xml::get_text(ptr);
@@ -1460,6 +1466,9 @@ yf::Zoom::BackendPtr yf::Zoom::Frontend::get_backend_from_databases(
                                         maximumRecords > 0 */
     b->set_option("piggyback", sptr->piggyback ? "1" : "0");
 
+    if (content_authentication.length() == 0)
+        content_authentication = sptr->contentAuthentication;
+
     if (authentication.length() == 0)
         authentication = sptr->authentication;