Move redirectError property up to application.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 4 Jul 2007 02:13:34 +0000 (02:13 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 4 Jul 2007 02:13:34 +0000 (02:13 +0000)
Add templates for result of local and global logout.

git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2338 cb58f699-b61c-0410-a6fe-9272a202ed29

schemas/shibboleth-2.0-native-sp-config.xsd
shibsp/ServiceProvider.cpp

index f94c33d..9c3e191 100644 (file)
                <complexType>\r
                        <sequence>\r
                                <element ref="conf:Sessions"/>\r
-                               <element ref="conf:Errors"/>\r
+                               <element ref="conf:Errors" minOccurs="0"/>\r
                                <element ref="conf:DefaultRelyingParty"/>\r
                                <element ref="saml:Audience" minOccurs="0" maxOccurs="unbounded"/>\r
                 <element name="MetadataProvider" type="conf:PluggableType"/>\r
                        <attribute name="id" type="conf:string" fixed="default"/>\r
                        <attribute name="entityID" type="anyURI" use="required"/>\r
                        <attribute name="policyId" type="conf:string" use="required"/>\r
-                       <attribute name="homeURL" type="anyURI" default="/"/>\r
-                       <attribute name="REMOTE_USER" type="conf:listOfStrings"/>\r
-                       <attribute name="unsetHeaders" type="conf:listOfStrings"/>\r
-               <anyAttribute namespace="##other" processContents="lax"/>\r
+                       <attributeGroup ref="conf:ApplicationGroup"/>\r
+                       <anyAttribute namespace="##other" processContents="lax"/>\r
                </complexType>\r
        </element>\r
        \r
                        <attribute name="id" type="conf:string" use="required"/>\r
                        <attribute name="entityID" type="anyURI"/>\r
                        <attribute name="policyId" type="conf:string"/>\r
-                       <attribute name="homeURL" type="anyURI" default="/"/>\r
-                       <attribute name="REMOTE_USER" type="conf:listOfStrings"/>\r
-                       <attribute name="unsetHeaders" type="conf:listOfStrings"/>\r
+                       <attributeGroup ref="conf:ApplicationGroup"/>\r
                        <anyAttribute namespace="##other" processContents="lax"/>\r
                </complexType>\r
        </element>\r
 \r
+       <attributeGroup name="ApplicationGroup">\r
+               <attribute name="homeURL" type="anyURI" default="/"/>\r
+               <attribute name="REMOTE_USER" type="conf:listOfStrings"/>\r
+               <attribute name="unsetHeaders" type="conf:listOfStrings"/>\r
+               <attribute name="redirectErrors" type="anyURI"/>\r
+               <attribute name="localLogout" type="anyURI"/>\r
+               <attribute name="globalLogout" type="anyURI"/>\r
+       </attributeGroup>\r
+               \r
        <element name="Sessions">\r
                <annotation>\r
                        <documentation>Container for specifying protocol handlers and session policy</documentation>\r
                        <attribute name="handlerSSL" type="boolean" default="true"/>\r
                        <attribute name="exportLocation" type="conf:string"/>\r
                        <attribute name="exportACL" type="conf:listOfStrings" default="127.0.0.1"/>\r
-                       <attribute name="redirectErrors" type="anyURI"/>\r
                        <attribute name="cookieName" type="conf:string"/>\r
                        <attribute name="cookieProps" type="conf:string"/>\r
                        <attribute name="idpHistory" type="boolean" default="true"/>\r
                        <anyAttribute namespace="##other" processContents="lax"/>\r
                </complexType>\r
        </element>\r
-       \r
+\r
        <attribute name="policyId" type="conf:string">\r
                <annotation>\r
                        <documentation>Used to reference Policy elements from profile endpoints.</documentation>\r
index 868584b..48b947a 100644 (file)
@@ -49,8 +49,7 @@ namespace shibsp {
     {
         if (mayRedirect) {
             // Check for redirection on errors instead of template.
-            const PropertySet* sessions=app ? app->getPropertySet("Sessions") : NULL;
-            pair<bool,const char*> redirectErrors = sessions ? sessions->getString("redirectErrors") : pair<bool,const char*>(false,NULL);
+            pair<bool,const char*> redirectErrors = app ? app->getString("redirectErrors") : pair<bool,const char*>(false,NULL);
             if (redirectErrors.first) {
                 string loc(redirectErrors.second);
                 loc = loc + '?' + tp.toQueryString();