Initial check-in.
authorScott Cantor <cantor.2@osu.edu>
Wed, 3 May 2006 20:57:48 +0000 (20:57 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 3 May 2006 20:57:48 +0000 (20:57 +0000)
saml/util/XMLConstants.cpp [new file with mode: 0644]
saml/util/XMLConstants.h [new file with mode: 0644]

diff --git a/saml/util/XMLConstants.cpp b/saml/util/XMLConstants.cpp
new file mode 100644 (file)
index 0000000..5290bed
--- /dev/null
@@ -0,0 +1,161 @@
+/*\r
+ *  Copyright 2001-2006 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/**\r
+ * XMLConstants.cpp\r
+ * \r
+ * SAML XML namespace constants \r
+ */\r
+\r
+\r
+#include "internal.h"\r
+#include "util/XMLConstants.h"\r
+#include <xercesc/util/XMLUniDefs.hpp>\r
+\r
+using namespace xercesc;\r
+using namespace opensaml;\r
+\r
+const XMLCh XMLConstants::SOAP11ENV_NS[] = // http://schemas.xmlsoap.org/soap/envelope/\r
+{ chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,\r
+  chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chLatin_s, chPeriod,\r
+      chLatin_x, chLatin_m, chLatin_l, chLatin_s, chLatin_o, chLatin_a, chLatin_p, chPeriod,\r
+      chLatin_o, chLatin_r, chLatin_g, chForwardSlash,\r
+  chLatin_s, chLatin_o, chLatin_a, chLatin_p, chForwardSlash,\r
+  chLatin_e, chLatin_n, chLatin_v, chLatin_e, chLatin_l, chLatin_o, chLatin_p, chLatin_e, chForwardSlash, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SOAP11ENV_PREFIX[] = UNICODE_LITERAL_1(S);\r
+\r
+const XMLCh XMLConstants::PAOS_NS[] = // urn:liberty:paos:2003-08\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon,\r
+  chLatin_l, chLatin_i, chLatin_b, chLatin_e, chLatin_r, chLatin_t, chLatin_y, chColon,\r
+  chLatin_p, chLatin_a, chLatin_o, chLatin_s, chColon,\r
+  chDigit_2, chDigit_0, chDigit_0, chDigit_3, chDash, chDigit_0, chDigit_8, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::PAOS_PREFIX[] = UNICODE_LITERAL_4(p,a,o,s);\r
+\r
+const XMLCh XMLConstants::SAML1_NS[] = // urn:oasis:names:tc:SAML:1.0:assertion\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,\r
+  chLatin_a, chLatin_s, chLatin_s, chLatin_e, chLatin_r, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML1P_NS[] = // urn:oasis:names:tc:SAML:1.0:protocol\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,\r
+  chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML1_PREFIX[] = UNICODE_LITERAL_4(s,a,m,l);\r
+\r
+const XMLCh XMLConstants::SAML1P_PREFIX[] = UNICODE_LITERAL_5(s,a,m,l,p);\r
+\r
+const XMLCh XMLConstants::SAML11_PROTOCOL_ENUM[] = // urn:oasis:names:tc:SAML:1.1:protocol\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,\r
+  chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML1_METADATA_PROFILE[] = // urn:oasis:names:tc:SAML:profiles:v1metadata\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon,\r
+  chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
+  chLatin_v, chDigit_1, chLatin_m, chLatin_e, chLatin_t, chLatin_a, chLatin_d, chLatin_a, chLatin_t, chLatin_a, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20_NS[] = // urn:oasis:names:tc:SAML:2.0:assertion\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_a, chLatin_s, chLatin_s, chLatin_e, chLatin_r, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20P_NS[] = // urn:oasis:names:tc:SAML:2.0:protocol\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20MD_NS[] = // urn:oasis:names:tc:SAML:2.0:metadata\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_m, chLatin_e, chLatin_t, chLatin_a, chLatin_d, chLatin_a, chLatin_t, chLatin_a, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20AC_NS[] = // urn:oasis:names:tc:SAML:2.0:ac\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_a, chLatin_c, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20_PREFIX[] = UNICODE_LITERAL_4(s,a,m,l);\r
+\r
+const XMLCh XMLConstants::SAML20P_PREFIX[] = UNICODE_LITERAL_5(s,a,m,l,p);\r
+\r
+const XMLCh XMLConstants::SAML20MD_PREFIX[] = UNICODE_LITERAL_2(m,d);\r
+\r
+const XMLCh XMLConstants::SAML20AC_PREFIX[] = UNICODE_LITERAL_2(a,c);\r
+\r
+const XMLCh XMLConstants::SAML20ECP_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
+  chLatin_S, chLatin_S, chLatin_O, chColon, chLatin_e, chLatin_c, chLatin_p, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20ECP_PREFIX[] = UNICODE_LITERAL_3(e,c,p);\r
+\r
+const XMLCh XMLConstants::SAML20DCE_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:DCE\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
+  chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,\r
+  chLatin_D, chLatin_C, chLatin_E, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20DCE_PREFIX[] = UNICODE_LITERAL_3(D,C,E);\r
+\r
+const XMLCh XMLConstants::SAML20X500_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
+  chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,\r
+  chLatin_X, chDigit_5, chDigit_0, chDigit_0, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20X500_PREFIX[] = { chLatin_x, chDigit_5, chDigit_0, chDigit_0 };\r
+\r
+const XMLCh XMLConstants::SAML20XACML_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:XACML\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
+  chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,\r
+  chLatin_X, chLatin_A, chLatin_C, chLatin_M, chLatin_L, chNull\r
+};\r
+\r
+const XMLCh XMLConstants::SAML20XACML_PREFIX[] = UNICODE_LITERAL_9(x,a,c,m,l,p,r,o,f);\r
diff --git a/saml/util/XMLConstants.h b/saml/util/XMLConstants.h
new file mode 100644 (file)
index 0000000..af7d4ba
--- /dev/null
@@ -0,0 +1,116 @@
+/*\r
+ *  Copyright 2001-2006 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/**\r
+ * @file XMLConstants.h\r
+ * \r
+ * SAML XML namespace constants \r
+ */\r
+\r
+#ifndef __saml_xmlconstants_h__\r
+#define __saml_xmlconstants_h__\r
+\r
+#include <xmltooling/util/XMLConstants.h>\r
+\r
+namespace opensaml {\r
+    \r
+    /**\r
+     * SAML related constants.\r
+     */\r
+    struct SAML_API XMLConstants : public xmltooling::XMLConstants\r
+    {\r
+        /**  SOAP 1.1 Envelope XML namespace ("http://schemas.xmlsoap.org/soap/envelope/") */\r
+        static const XMLCh SOAP11ENV_NS[]; \r
+\r
+        /**  SOAP 1.1 Envelope QName prefix ("S") */\r
+        static const XMLCh SOAP11ENV_PREFIX[];\r
+    \r
+        /**  Liberty PAOS XML Namespace ("urn:liberty:paos:2003-08") */\r
+        static const XMLCh PAOS_NS[];\r
+        \r
+        /**  Liberty PAOS QName prefix ("paos") */\r
+        static const XMLCh PAOS_PREFIX[];\r
+    \r
+        /**  SAML 1.X Assertion XML namespace ("urn:oasis:names:tc:SAML:1.0:assertion") */\r
+        static const XMLCh SAML1_NS[];\r
+\r
+        /**  SAML 1.X Protocol XML namespace ("urn:oasis:names:tc:SAML:1.0:protocol") */\r
+        static const XMLCh SAML1P_NS[];\r
+        \r
+        /** SAML 1.X Assertion QName prefix ("saml") */\r
+        static const XMLCh SAML1_PREFIX[];\r
+    \r
+        /** SAML 1.X Protocol QName prefix ("samlp") */\r
+        static const XMLCh SAML1P_PREFIX[];\r
+        \r
+        /** SAML 1.1 Protocol Enumeration constant ("urn:oasis:names:tc:SAML:1.0:protocol") */\r
+        static const XMLCh SAML11_PROTOCOL_ENUM[];\r
+        \r
+        /** SAML 1.x Metadata Profile ID ("urn:oasis:names:tc:SAML:profiles:v1metadata") */\r
+        static const XMLCh SAML1_METADATA_PROFILE[];\r
+        \r
+        /**  SAML 2.0 Assertion XML namespace ("urn:oasis:names:tc:SAML:2.0:assertion") */\r
+        static const XMLCh SAML20_NS[];\r
+\r
+        /**  SAML 2.0 Protocol XML namespace ("urn:oasis:names:tc:SAML:2.0:protocol") */\r
+        static const XMLCh SAML20P_NS[];\r
+\r
+        /**  SAML 2.0 Metadata XML namespace ("urn:oasis:names:tc:SAML:2.0:metadata") */\r
+        static const XMLCh SAML20MD_NS[];\r
+\r
+        /**  SAML 2.0 AuthnContext XML namespace ("urn:oasis:names:tc:SAML:2.0:ac") */\r
+        static const XMLCh SAML20AC_NS[];\r
+        \r
+        /** SAML 2.0 Assertion QName prefix ("saml") */\r
+        static const XMLCh SAML20_PREFIX[];\r
+    \r
+        /** SAML 2.0 Protocol QName prefix ("samlp") */\r
+        static const XMLCh SAML20P_PREFIX[];\r
+\r
+        /** SAML 2.0 Metadata QName prefix ("md") */\r
+        static const XMLCh SAML20MD_PREFIX[];\r
+\r
+        /** SAML 2.0 AuthnContext QName prefix ("ac") */\r
+        static const XMLCh SAML20AC_PREFIX[];\r
+\r
+        /** SAML 2.0 Enhanced Client/Proxy SSO Profile XML Namespace ("urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp") */\r
+        static const XMLCh SAML20ECP_NS[];\r
+        \r
+        /** SAML 2.0 Enhanced Client/Proxy SSO Profile QName prefix ("ecp") */\r
+        static const XMLCh SAML20ECP_PREFIX[];\r
+    \r
+        /** SAML 2.0 DCE PAC Attribute Profile XML Namespace ("urn:oasis:names:tc:SAML:2.0:profiles:attribute:DCE") */\r
+        static const XMLCh SAML20DCE_NS[];\r
+        \r
+        /** SAML 2.0 DCE PAC Attribute Profile QName prefix ("DCE") */\r
+        static const XMLCh SAML20DCE_PREFIX[];\r
+    \r
+        /** SAML 2.0 X.500 Attribute Profile XML Namespace ("urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500") */\r
+        static const XMLCh SAML20X500_NS[];\r
+        \r
+        /** SAML 2.0 X.500 Attribute Profile QName prefix ("x500") */\r
+        static const XMLCh SAML20X500_PREFIX[];\r
+    \r
+        /** SAML 2.0 XACML Attribute Profile XML Namespace ("urn:oasis:names:tc:SAML:2.0:profiles:attribute:XACML") */\r
+        static const XMLCh SAML20XACML_NS[];\r
+        \r
+        /** SAML 2.0 XACML Attribute Profile QName prefix ("xacmlprof") */\r
+        static const XMLCh SAML20XACML_PREFIX[];\r
+    };\r
+\r
+};\r
+\r
+#endif /* __saml_xmlconstants_h__ */\r