Generalize notification mechanism (should work for NameID mgmt later).
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 3 Jul 2007 22:21:07 +0000 (22:21 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Tue, 3 Jul 2007 22:21:07 +0000 (22:21 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2337 cb58f699-b61c-0410-a6fe-9272a202ed29

.cproject [moved from .cdtproject with 75% similarity]
schemas/shibboleth-2.0-native-sp-config.xsd
shibsp/Application.h
shibsp/impl/XMLServiceProvider.cpp

similarity index 75%
rename from .cdtproject
rename to .cproject
index 0a68048..2bf704c 100644 (file)
+++ b/.cproject
@@ -1,36 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>
-<data>
-        
-    <item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="out" path=""/>
-<pathentry excluding="util/|impl/|security/|metadata/|remoting/|remoting/impl/|attribute/|binding/|binding/impl/|attribute/resolver/|attribute/resolver/impl/|handler/|handler/impl/|attribute/filtering/|attribute/filtering/impl/|lite/" kind="src" path="shibsp"/>
-<pathentry excluding="resolver/|resolver/impl/|filtering/|filtering/impl/" kind="src" path="shibsp/attribute"/>
-<pathentry excluding="impl/" kind="src" path="shibsp/attribute/filtering"/>
-<pathentry kind="src" path="shibsp/attribute/filtering/impl"/>
-<pathentry excluding="impl/" kind="src" path="shibsp/attribute/resolver"/>
-<pathentry kind="src" path="shibsp/attribute/resolver/impl"/>
-<pathentry excluding="impl/" kind="src" path="shibsp/binding"/>
-<pathentry kind="src" path="shibsp/binding/impl"/>
-<pathentry excluding="impl/" kind="src" path="shibsp/handler"/>
-<pathentry kind="src" path="shibsp/handler/impl"/>
-<pathentry kind="src" path="shibsp/impl"/>
-<pathentry kind="src" path="shibsp/lite"/>
-<pathentry kind="src" path="shibsp/metadata"/>
-<pathentry excluding="impl/" kind="src" path="shibsp/remoting"/>
-<pathentry kind="src" path="shibsp/remoting/impl"/>
-<pathentry kind="src" path="shibsp/security"/>
-<pathentry kind="src" path="shibsp/util"/>
-<pathentry kind="src" path="shibd"/>
-<pathentry kind="src" path="apache"/>
-<pathentry kind="src" path="isapi_shib"/>
-<pathentry kind="src" path="nsapi_shib"/>
-<pathentry kind="src" path="odbc-store"/>
-<pathentry kind="src" path="util"/>
-</item>
-</data>
-</cdtproject>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<?fileVersion 4.0.0?>\r
+\r
+<cproject>\r
+<storageModule moduleId="org.eclipse.cdt.core.settings">\r
+<cconfiguration id="converted.config.1630818620">\r
+<storageModule moduleId="org.eclipse.cdt.core.pathentry">\r
+<pathentry kind="out" path=""/>\r
+<pathentry excluding="util/|impl/|security/|metadata/|remoting/|remoting/impl/|attribute/|binding/|binding/impl/|attribute/resolver/|attribute/resolver/impl/|handler/|handler/impl/|attribute/filtering/|attribute/filtering/impl/|lite/" kind="src" path="shibsp"/>\r
+<pathentry excluding="resolver/|resolver/impl/|filtering/|filtering/impl/" kind="src" path="shibsp/attribute"/>\r
+<pathentry excluding="impl/" kind="src" path="shibsp/attribute/filtering"/>\r
+<pathentry kind="src" path="shibsp/attribute/filtering/impl"/>\r
+<pathentry excluding="impl/" kind="src" path="shibsp/attribute/resolver"/>\r
+<pathentry kind="src" path="shibsp/attribute/resolver/impl"/>\r
+<pathentry excluding="impl/" kind="src" path="shibsp/binding"/>\r
+<pathentry kind="src" path="shibsp/binding/impl"/>\r
+<pathentry excluding="impl/" kind="src" path="shibsp/handler"/>\r
+<pathentry kind="src" path="shibsp/handler/impl"/>\r
+<pathentry kind="src" path="shibsp/impl"/>\r
+<pathentry kind="src" path="shibsp/lite"/>\r
+<pathentry kind="src" path="shibsp/metadata"/>\r
+<pathentry excluding="impl/" kind="src" path="shibsp/remoting"/>\r
+<pathentry kind="src" path="shibsp/remoting/impl"/>\r
+<pathentry kind="src" path="shibsp/security"/>\r
+<pathentry kind="src" path="shibsp/util"/>\r
+<pathentry kind="src" path="shibd"/>\r
+<pathentry kind="src" path="apache"/>\r
+<pathentry kind="src" path="isapi_shib"/>\r
+<pathentry kind="src" path="nsapi_shib"/>\r
+<pathentry kind="src" path="odbc-store"/>\r
+<pathentry kind="src" path="util"/>\r
+</storageModule>\r
+<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="converted.config.1630818620" moduleId="org.eclipse.cdt.core.settings" name="convertedConfig">\r
+<externalSettings/>\r
+<extensions>\r
+<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>\r
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>\r
+</extensions>\r
+</storageModule>\r
+</cconfiguration>\r
+</storageModule>\r
+</cproject>\r
index 1b88c53..f94c33d 100644 (file)
                </complexType>\r
        </element>\r
 \r
-       <element name="NotifyOnLogout">\r
+       <element name="Notify">\r
                <annotation>\r
-                       <documentation>Used to specify locations to receive application notifications of logout</documentation>\r
+                       <documentation>Used to specify locations to receive application notifications</documentation>\r
                </annotation>\r
                <complexType>\r
                        <sequence/>\r
index d32f76a..ae6e76f 100644 (file)
@@ -154,14 +154,14 @@ namespace shibsp {
 #endif
 
         /**
-         * Returns the designated logout notification URL, or an empty string if no more locations are specified.
+         * Returns the designated notification URL, or an empty string if no more locations are specified.
          *
          * @param request   SP request to use to fill in missing pieces of URL
          * @param front     true iff front channel notification is desired, false iff back channel is desired
          * @param index     zero-based index of URL to return
          * @return  the designated URL, or an empty string
          */
-        virtual std::string getLogoutNotification(const xmltooling::HTTPRequest& request, bool front, unsigned int index) const=0;
+        virtual std::string getNotificationURL(const xmltooling::HTTPRequest& request, bool front, unsigned int index) const=0;
 
         /**
          * Returns a set of attribute IDs to use as a REMOTE_USER value.
index 2c1e147..4c57cdd 100644 (file)
@@ -129,7 +129,7 @@ namespace {
             return (m_audiences.empty() && m_base) ? m_base->getAudiences() : m_audiences;
         }
 #endif
-        string getLogoutNotification(const HTTPRequest& request, bool front, unsigned int index) const;
+        string getNotificationURL(const HTTPRequest& request, bool front, unsigned int index) const;
 
         const set<string>& getRemoteUserAttributeIds() const {
             return (m_remoteUsers.empty() && m_base) ? m_base->getRemoteUserAttributeIds() : m_remoteUsers;
@@ -390,7 +390,7 @@ namespace {
     static const XMLCh _ManageNameIDService[] = UNICODE_LITERAL_19(M,a,n,a,g,e,N,a,m,e,I,D,S,e,r,v,i,c,e);
     static const XMLCh MemoryListener[] =       UNICODE_LITERAL_14(M,e,m,o,r,y,L,i,s,t,e,n,e,r);
     static const XMLCh _MetadataProvider[] =    UNICODE_LITERAL_16(M,e,t,a,d,a,t,a,P,r,o,v,i,d,e,r);
-    static const XMLCh NotifyOnLogout[] =       UNICODE_LITERAL_14(N,o,t,i,f,y,O,n,L,o,g,o,u,t);
+    static const XMLCh Notify[] =               UNICODE_LITERAL_6(N,o,t,i,f,y);
     static const XMLCh OutOfProcess[] =         UNICODE_LITERAL_12(O,u,t,O,f,P,r,o,c,e,s,s);
     static const XMLCh _path[] =                UNICODE_LITERAL_4(p,a,t,h);
     static const XMLCh Policy[] =               UNICODE_LITERAL_6(P,o,l,i,c,y);
@@ -660,8 +660,8 @@ XMLApplication::XMLApplication(
             child = XMLHelper::getNextSiblingElement(child);
         }
 
-        // Logout notification.
-        DOMNodeList* nlist=e->getElementsByTagNameNS(shibspconstants::SHIB2SPCONFIG_NS,NotifyOnLogout);
+        // Notification.
+        DOMNodeList* nlist=e->getElementsByTagNameNS(shibspconstants::SHIB2SPCONFIG_NS,Notify);
         for (XMLSize_t i=0; nlist && i<nlist->getLength(); i++) {
             if (nlist->item(i)->getParentNode()->isSameNode(e)) {
                 const XMLCh* channel = static_cast<DOMElement*>(nlist->item(i))->getAttributeNS(NULL,Channel);
@@ -878,7 +878,7 @@ short XMLApplication::acceptNode(const DOMNode* node) const
     const XMLCh* name=node->getLocalName();
     if (XMLString::equals(name,_Application) ||
         XMLString::equals(name,_Audience) ||
-        XMLString::equals(name,NotifyOnLogout) ||
+        XMLString::equals(name,Notify) ||
         XMLString::equals(name,_AssertionConsumerService) ||
         XMLString::equals(name,_ArtifactResolutionService) ||
         XMLString::equals(name,_SingleLogoutService) ||
@@ -937,11 +937,11 @@ const PropertySet* XMLApplication::getRelyingParty(const EntityDescriptor* provi
 
 #endif
 
-string XMLApplication::getLogoutNotification(const HTTPRequest& request, bool front, unsigned int index) const
+string XMLApplication::getNotificationURL(const HTTPRequest& request, bool front, unsigned int index) const
 {
     const vector<string>& locs = front ? m_frontLogout : m_backLogout;
     if (locs.empty())
-        return m_base ? m_base->getLogoutNotification(request, front, index) : string();
+        return m_base ? m_base->getNotificationURL(request, front, index) : string();
     else if (index >= locs.size())
         return string();
 
@@ -958,7 +958,7 @@ string XMLApplication::getLogoutNotification(const HTTPRequest& request, bool fr
     // Should never happen...
     if (!handler || (*handler!='/' && strncmp(handler,"http:",5) && strncmp(handler,"https:",6)))
         throw ConfigurationException(
-            "Invalid Location property ($1) in logout notification for Application ($2)",
+            "Invalid Location property ($1) in Notify element for Application ($2)",
             params(2, handler ? handler : "null", getId())
             );