https://issues.shibboleth.net/jira/browse/SSPCPP-469
authorScott Cantor <cantor.2@osu.edu>
Tue, 10 Jul 2012 02:47:12 +0000 (02:47 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 10 Jul 2012 02:47:12 +0000 (02:47 +0000)
saml/saml2/core/Protocols.h
saml/saml2/core/impl/Protocols20Impl.cpp
saml/util/SAMLConstants.cpp
saml/util/SAMLConstants.h
schemas/saml-async-slo-v1.0.xsd [new file with mode: 0644]
schemas/saml20-catalog.xml.in

index f487295..52e65a7 100644 (file)
@@ -50,6 +50,11 @@ namespace opensaml {
 
         DECL_XMLOBJECT_SIMPLE(SAML_API,RespondTo,Name,SAML 2.0 third-party request RespondTo extension element);
 
+        BEGIN_XMLOBJECT(SAML_API,Asynchronous,xmltooling::XMLObject,SAML 2.0 Asynchronous logout extension element);
+            /** AsynchronousType local name */
+            static const XMLCh TYPE_NAME[];
+        END_XMLOBJECT;
+
         BEGIN_XMLOBJECT(SAML_API,Extensions,xmltooling::ElementExtensibleXMLObject,SAML 2.0 protocol Extensions element);
             /** ExtensionsType local name */
             static const XMLCh TYPE_NAME[];
@@ -393,6 +398,8 @@ namespace opensaml {
         
         DECL_XMLOBJECTBUILDER(SAML_API,RespondTo,samlconstants::SAML20P_THIRDPARTY_EXT_NS,samlconstants::SAML20P_THIRDPARTY_EXT_PREFIX);
 
+        DECL_XMLOBJECTBUILDER(SAML_API,Asynchronous,samlconstants::SAML20P_ASYNCSLO_EXT_NS,samlconstants::SAML20P_ASYNCSLO_EXT_PREFIX);
+
         /**
          * Registers builders and validators for SAML 2.0 Protocol classes into the runtime.
          */
index bfd4d82..95e75cd 100644 (file)
@@ -71,7 +71,27 @@ namespace opensaml {
 
         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RespondTo);
 
-        //TODO need unit test for this, using objects from another namespace
+        class SAML_DLLLOCAL AsynchronousImpl : public virtual Asynchronous,
+            public AbstractSimpleElement,
+            public AbstractDOMCachingXMLObject,
+            public AbstractXMLObjectMarshaller,
+            public AbstractXMLObjectUnmarshaller
+        {
+        public:
+            virtual ~AsynchronousImpl() {}
+
+            AsynchronousImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
+
+            AsynchronousImpl(const AsynchronousImpl& src)
+                : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {}
+
+            IMPL_XMLOBJECT_CLONE(Asynchronous);
+
+        protected:
+            // has no attributes or children
+        };
+
         class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
              public AbstractComplexElement,
              public AbstractDOMCachingXMLObject,
@@ -1559,6 +1579,7 @@ IMPL_XMLOBJECTBUILDER(StatusMessage);
 IMPL_XMLOBJECTBUILDER(Terminate);
 
 IMPL_XMLOBJECTBUILDER(RespondTo);
+IMPL_XMLOBJECTBUILDER(Asynchronous);
 
 // Unicode literals
 const XMLCh Artifact::LOCAL_NAME[] = UNICODE_LITERAL_8(A,r,t,i,f,a,c,t);
@@ -1568,6 +1589,8 @@ const XMLCh ArtifactResponse::LOCAL_NAME[] = UNICODE_LITERAL_16(A,r,t,i,f,a,c,t,
 const XMLCh ArtifactResponse::TYPE_NAME[] = UNICODE_LITERAL_20(A,r,t,i,f,a,c,t,R,e,s,p,o,n,s,e,T,y,p,e);
 const XMLCh AssertionIDRequest::LOCAL_NAME[] = UNICODE_LITERAL_18(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t);
 const XMLCh AssertionIDRequest::TYPE_NAME[] = UNICODE_LITERAL_22(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t,T,y,p,e);
+const XMLCh Asynchronous::LOCAL_NAME[] = UNICODE_LITERAL_12(A,s,y,n,c,h,r,o,n,o,u,s);
+const XMLCh Asynchronous::TYPE_NAME[] = UNICODE_LITERAL_16(A,s,y,n,c,h,r,o,n,o,u,s,T,y,p,e);
 const XMLCh AttributeQuery::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,Q,u,e,r,y);
 const XMLCh AttributeQuery::TYPE_NAME[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,Q,u,e,r,y,T,y,p,e);
 const XMLCh AuthnQuery::LOCAL_NAME[] = UNICODE_LITERAL_10(A,u,t,h,n,Q,u,e,r,y);
index 731693f..0ed80f2 100644 (file)
@@ -188,6 +188,17 @@ const XMLCh samlconstants::SAML20P_THIRDPARTY_EXT_NS[] = // urn:oasis:names:tc:S
 
 const XMLCh samlconstants::SAML20P_THIRDPARTY_EXT_PREFIX[] = UNICODE_LITERAL_6(t,h,r,p,t,y);
 
+const XMLCh samlconstants::SAML20P_ASYNCSLO_EXT_NS[] = // urn:oasis:names:tc:SAML:2.0:protocol:ext:async-slo
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chDigit_0, chColon,
+  chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chColon,
+  chLatin_e, chLatin_x, chLatin_t, chColon,
+  chLatin_a, chLatin_s, chLatin_y, chLatin_n, chLatin_c, chDash, chLatin_s, chLatin_l, chLatin_o, chNull
+};
+
+const XMLCh samlconstants::SAML20P_ASYNCSLO_EXT_PREFIX[] = UNICODE_LITERAL_4(a,s,l,o);
+
 const XMLCh samlconstants::SAML20_ATTRIBUTE_EXT_NS[] = // urn:oasis:names:tc:SAML:attribute:ext
 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
index 6a9d2a5..f74dfb6 100644 (file)
@@ -128,6 +128,12 @@ namespace samlconstants {
     /** SAML Third-Party Request Protocol Extension QName prefix ("thrpty") */
     extern SAML_API const XMLCh SAML20P_THIRDPARTY_EXT_PREFIX[];
 
+    /** SAML Asynchronous Logout Protocol Extension XML Namespace ("urn:oasis:names:tc:SAML:2.0:protocol:ext:async-slo") */
+    extern SAML_API const XMLCh SAML20P_ASYNCSLO_EXT_NS[];
+
+    /** SAML Asynchronous Logout Protocol Extension QName prefix ("aslo") */
+    extern SAML_API const XMLCh SAML20P_ASYNCSLO_EXT_PREFIX[];
+
     /** SAML Attribute Extension XML Namespace ("urn:oasis:names:tc:SAML:attribute:ext") */
     extern SAML_API const XMLCh SAML20_ATTRIBUTE_EXT_NS[];
 
diff --git a/schemas/saml-async-slo-v1.0.xsd b/schemas/saml-async-slo-v1.0.xsd
new file mode 100644 (file)
index 0000000..2a64b89
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema xmlns:aslo="urn:oasis:names:tc:SAML:2.0:protocol:ext:async-slo" 
+        xmlns="http://www.w3.org/2001/XMLSchema"  
+        targetNamespace="urn:oasis:names:tc:SAML:2.0:protocol:ext:async-slo"
+        elementFormDefault="qualified">
+    
+    <element name="Asynchronous" type="aslo:AsynchronousType" />
+    <complexType name="AsynchronousType" />
+
+    <attribute name="supportsAsynchronous" type="boolean"/>
+    
+</schema>
index b5ef6d3..e480f57 100644 (file)
@@ -18,4 +18,5 @@
     <system systemId="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol" uri="@-PKGXMLDIR-@/sstc-saml-idp-discovery.xsd"/>
     <system systemId="urn:oasis:names:tc:SAML:profiles:SSO:request-init" uri="@-PKGXMLDIR-@/sstc-request-initiation.xsd"/>
     <system systemId="urn:oasis:names:tc:SAML:protocol:ext:third-party" uri="@-PKGXMLDIR-@/sstc-saml-protocol-ext-thirdparty.xsd"/>
+    <system systemId="urn:oasis:names:tc:SAML:2.0:protocol:ext:async-slo" uri="@-PKGXMLDIR-@/saml-async-slo-v1.0.xsd"/>
 </catalog>