Moved logout templates to Errors tag.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 23 Jan 2008 03:03:45 +0000 (03:03 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 23 Jan 2008 03:03:45 +0000 (03:03 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2699 cb58f699-b61c-0410-a6fe-9272a202ed29

schemas/shibboleth-2.0-native-sp-config.xsd
shibsp/handler/impl/LogoutHandler.cpp

index 90ab0ee..54d9b3a 100644 (file)
                <attribute name="unsetHeaders" type="conf:listOfStrings"/>\r
                <attribute name="metadataAttributePrefix" type="conf:string"/>\r
            <attribute name="attributePrefix" type="conf:string"/>\r
                <attribute name="unsetHeaders" type="conf:listOfStrings"/>\r
                <attribute name="metadataAttributePrefix" type="conf:string"/>\r
            <attribute name="attributePrefix" type="conf:string"/>\r
-               <attribute name="localLogout" type="anyURI"/>\r
-               <attribute name="globalLogout" type="anyURI"/>\r
        </attributeGroup>\r
 \r
     <attributeGroup name="RelyingPartyGroup">\r
        </attributeGroup>\r
 \r
     <attributeGroup name="RelyingPartyGroup">\r
                        <attribute name="metadata" type="anyURI"/>\r
                        <attribute name="access" type="anyURI"/>\r
                        <attribute name="ssl" type="anyURI"/>\r
                        <attribute name="metadata" type="anyURI"/>\r
                        <attribute name="access" type="anyURI"/>\r
                        <attribute name="ssl" type="anyURI"/>\r
+            <attribute name="localLogout" type="anyURI"/>\r
+            <attribute name="globalLogout" type="anyURI"/>\r
                        <attribute name="supportContact" type="conf:string"/>\r
                        <attribute name="logoLocation" type="anyURI"/>\r
                        <attribute name="styleSheet" type="anyURI"/>\r
                        <attribute name="supportContact" type="conf:string"/>\r
                        <attribute name="logoLocation" type="anyURI"/>\r
                        <attribute name="styleSheet" type="anyURI"/>\r
index 5342397..8bd3d56 100644 (file)
@@ -40,7 +40,8 @@ pair<bool,long> LogoutHandler::sendLogoutPage(
     const Application& application, const HTTPRequest& request, HTTPResponse& response, bool local, const char* status
     ) const
 {
     const Application& application, const HTTPRequest& request, HTTPResponse& response, bool local, const char* status
     ) const
 {
-    pair<bool,const char*> prop = application.getString(local ? "localLogout" : "globalLogout");
+    const PropertySet* props = application.getPropertySet("Errors");
+    pair<bool,const char*> prop = props ? props->getString(local ? "localLogout" : "globalLogout") : pair<bool,const char*>(false,NULL);
     if (prop.first) {
         response.setContentType("text/html");
         response.setResponseHeader("Expires","01-Jan-1997 12:00:00 GMT");
     if (prop.first) {
         response.setContentType("text/html");
         response.setResponseHeader("Expires","01-Jan-1997 12:00:00 GMT");
@@ -50,7 +51,7 @@ pair<bool,long> LogoutHandler::sendLogoutPage(
             throw ConfigurationException("Unable to access $1 HTML template.", params(1,local ? "localLogout" : "globalLogout"));
         TemplateParameters tp;
         tp.m_request = &request;
             throw ConfigurationException("Unable to access $1 HTML template.", params(1,local ? "localLogout" : "globalLogout"));
         TemplateParameters tp;
         tp.m_request = &request;
-        tp.setPropertySet(application.getPropertySet("Errors"));
+        tp.setPropertySet(props);
         if (status)
             tp.m_map["logoutStatus"] = status;
         stringstream str;
         if (status)
             tp.m_map["logoutStatus"] = status;
         stringstream str;