Change inline RequestMap to a level beneath.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 19 Mar 2004 03:28:07 +0000 (03:28 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 19 Mar 2004 03:28:07 +0000 (03:28 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@880 cb58f699-b61c-0410-a6fe-9272a202ed29

configs/shibboleth.xml.in
shib-target/shib-ini.cpp

index 9fe3c27..7e60de3 100644 (file)
                uri="@-PKGSYSCONFDIR-@/applications.xml"/>
         -->
 
-        <RequestMap>
-            <Host name="example.com" scheme="https">
-                <Path name="admin" applicationId="foo-admin" requireSession="true" exportAssertion="true"/>
-            </Host>
-        </RequestMap>
+               <RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap">
+               <RequestMap>
+                   <Host name="example.com" scheme="https">
+                       <Path name="admin" applicationId="foo-admin" requireSession="true" exportAssertion="true"/>
+                   </Host>
+               </RequestMap>
+           </RequestMapProvider>
         
         <Implementation>
             <ISAPI>
index 29b3bdd..15ba9fb 100644 (file)
@@ -835,33 +835,25 @@ void XMLConfigImpl::init(bool first)
         
         // Back to the fully dynamic stuff...next up is the Request Mapper.
         if (conf.isEnabled(ShibTargetConfig::RequestMapper)) {
-            IPlugIn* plugin=NULL;
-            const DOMElement* child=saml::XML::getFirstChildElement(SHIRE,ShibTargetConfig::SHIBTARGET_NS,SHIBT_L(RequestMap));
+            const DOMElement* child=saml::XML::getFirstChildElement(SHIRE,ShibTargetConfig::SHIBTARGET_NS,SHIBT_L(RequestMapProvider));
             if (child) {
-                log.info("building Request Mapper of type %s...",shibtarget::XML::RequestMapType);
-                plugin=shibConf.m_plugMgr.newPlugin(shibtarget::XML::RequestMapType,child);
-            }
-            else {
-                child=saml::XML::getFirstChildElement(SHIRE,ShibTargetConfig::SHIBTARGET_NS,SHIBT_L(RequestMapProvider));
-                if (child) {
-                    auto_ptr_char type(child->getAttributeNS(NULL,SHIBT_L(type)));
-                    log.info("building Request Mapper of type %s...",type.get());
-                    plugin=shibConf.m_plugMgr.newPlugin(type.get(),child);
-                }
-                else {
-                    log.fatal("can't build Request Mapper object, missing conf:RequestMapProvider element?");
-                    throw MalformedException("can't build Request Mapper object, missing conf:RequestMapProvider element?");
+                auto_ptr_char type(child->getAttributeNS(NULL,SHIBT_L(type)));
+                log.info("building Request Mapper of type %s...",type.get());
+                IPlugIn* plugin=shibConf.m_plugMgr.newPlugin(type.get(),child);
+                if (plugin) {
+                    IRequestMapper* reqmap=dynamic_cast<IRequestMapper*>(plugin);
+                    if (reqmap)
+                        m_requestMapper=reqmap;
+                    else {
+                        delete plugin;
+                        log.fatal("plugin was not a Request Mapper object");
+                        throw UnsupportedExtensionException("plugin was not a Request Mapper object");
+                    }
                 }
             }
-            if (plugin) {
-                IRequestMapper* reqmap=dynamic_cast<IRequestMapper*>(plugin);
-                if (reqmap)
-                    m_requestMapper=reqmap;
-                else {
-                    delete plugin;
-                    log.fatal("plugin was not a Request Mapper object");
-                    throw UnsupportedExtensionException("plugin was not a Request Mapper object");
-                }
+            else {
+                log.fatal("can't build Request Mapper object, missing conf:RequestMapProvider element?");
+                throw MalformedException("can't build Request Mapper object, missing conf:RequestMapProvider element?");
             }
         }