From: Adam Dickmeiss Date: Wed, 7 Jan 2015 11:19:55 +0000 (+0100) Subject: zoom: handle contentAuthentication MP-587 X-Git-Tag: v1.8.0~1 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=e3b7970c1a533e4c14aa459f80ab002af4fdabf3;p=metaproxy-moved-to-github.git zoom: handle contentAuthentication MP-587 --- diff --git a/doc/zoom.xml b/doc/zoom.xml index 3f2849a..9fb72fa 100644 --- a/doc/zoom.xml +++ b/doc/zoom.xml @@ -491,6 +491,15 @@ + + contentAuthentication + + Specifies authentication info to be passed to a content connector. + This is only used if content-user and content-password are omitted. + + + + contentConnector diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index f2d7127..8ca763b 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -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; diff --git a/xml/schema/filter_zoom.rnc b/xml/schema/filter_zoom.rnc index 90614eb..13a0540 100644 --- a/xml/schema/filter_zoom.rnc +++ b/xml/schema/filter_zoom.rnc @@ -31,6 +31,7 @@ filter_zoom = element mp:cclmap_su { xsd:string }?, element mp:cclmap_term { xsd:string }?, element mp:cclmap_ti { xsd:string }?, + element mp:contentAuthentication { xsd:string }?, element mp:elementSet { xsd:string }?, element mp:recordEncoding { xsd:string }?, element mp:requestSyntax { xsd:string }?,