SAML objects in progress.
[shibboleth/cpp-opensaml.git] / saml / util / SAMLConstants.cpp
1 /*\r
2  *  Copyright 2001-2006 Internet2\r
3  * \r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *     http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 /**\r
18  * SAMLConstants.cpp\r
19  * \r
20  * SAML XML namespace constants \r
21  */\r
22 \r
23 \r
24 #include "internal.h"\r
25 #include "util/SAMLConstants.h"\r
26 #include <xercesc/util/XMLUniDefs.hpp>\r
27 \r
28 using namespace xercesc;\r
29 using namespace opensaml;\r
30 \r
31 const XMLCh SAMLConstants::SOAP11ENV_NS[] = // http://schemas.xmlsoap.org/soap/envelope/\r
32 { chLatin_h, chLatin_t, chLatin_t, chLatin_p, chColon, chForwardSlash, chForwardSlash,\r
33   chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a, chLatin_s, chPeriod,\r
34       chLatin_x, chLatin_m, chLatin_l, chLatin_s, chLatin_o, chLatin_a, chLatin_p, chPeriod,\r
35       chLatin_o, chLatin_r, chLatin_g, chForwardSlash,\r
36   chLatin_s, chLatin_o, chLatin_a, chLatin_p, chForwardSlash,\r
37   chLatin_e, chLatin_n, chLatin_v, chLatin_e, chLatin_l, chLatin_o, chLatin_p, chLatin_e, chForwardSlash, chNull\r
38 };\r
39 \r
40 const XMLCh SAMLConstants::SOAP11ENV_PREFIX[] = UNICODE_LITERAL_1(S);\r
41 \r
42 const XMLCh SAMLConstants::PAOS_NS[] = // urn:liberty:paos:2003-08\r
43 { chLatin_u, chLatin_r, chLatin_n, chColon,\r
44   chLatin_l, chLatin_i, chLatin_b, chLatin_e, chLatin_r, chLatin_t, chLatin_y, chColon,\r
45   chLatin_p, chLatin_a, chLatin_o, chLatin_s, chColon,\r
46   chDigit_2, chDigit_0, chDigit_0, chDigit_3, chDash, chDigit_0, chDigit_8, chNull\r
47 };\r
48 \r
49 const XMLCh SAMLConstants::PAOS_PREFIX[] = UNICODE_LITERAL_4(p,a,o,s);\r
50 \r
51 const XMLCh SAMLConstants::SAML1_NS[] = // urn:oasis:names:tc:SAML:1.0:assertion\r
52 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
53   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
54   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,\r
55   chLatin_a, chLatin_s, chLatin_s, chLatin_e, chLatin_r, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull\r
56 };\r
57 \r
58 const XMLCh SAMLConstants::SAML1P_NS[] = // urn:oasis:names:tc:SAML:1.0:protocol\r
59 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
60   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
61   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,\r
62   chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull\r
63 };\r
64 \r
65 const XMLCh SAMLConstants::SAML1_PREFIX[] = UNICODE_LITERAL_4(s,a,m,l);\r
66 \r
67 const XMLCh SAMLConstants::SAML1P_PREFIX[] = UNICODE_LITERAL_5(s,a,m,l,p);\r
68 \r
69 const XMLCh SAMLConstants::SAML11_PROTOCOL_ENUM[] = // urn:oasis:names:tc:SAML:1.1:protocol\r
70 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
71   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
72   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,\r
73   chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull\r
74 };\r
75 \r
76 const XMLCh SAMLConstants::SAML1_METADATA_PROFILE[] = // urn:oasis:names:tc:SAML:profiles:v1metadata\r
77 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
78   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
79   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon,\r
80   chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
81   chLatin_v, chDigit_1, chLatin_m, chLatin_e, chLatin_t, chLatin_a, chLatin_d, chLatin_a, chLatin_t, chLatin_a, chNull\r
82 };\r
83 \r
84 const XMLCh SAMLConstants::SAML20_NS[] = // urn:oasis:names:tc:SAML:2.0:assertion\r
85 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
86   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
87   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
88   chLatin_a, chLatin_s, chLatin_s, chLatin_e, chLatin_r, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull\r
89 };\r
90 \r
91 const XMLCh SAMLConstants::SAML20P_NS[] = // urn:oasis:names:tc:SAML:2.0:protocol\r
92 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
93   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
94   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
95   chLatin_p, chLatin_r, chLatin_o, chLatin_t, chLatin_o, chLatin_c, chLatin_o, chLatin_l, chNull\r
96 };\r
97 \r
98 const XMLCh SAMLConstants::SAML20MD_NS[] = // urn:oasis:names:tc:SAML:2.0:metadata\r
99 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
100   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
101   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
102   chLatin_m, chLatin_e, chLatin_t, chLatin_a, chLatin_d, chLatin_a, chLatin_t, chLatin_a, chNull\r
103 };\r
104 \r
105 const XMLCh SAMLConstants::SAML20AC_NS[] = // urn:oasis:names:tc:SAML:2.0:ac\r
106 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
107   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
108   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
109   chLatin_a, chLatin_c, chNull\r
110 };\r
111 \r
112 const XMLCh SAMLConstants::SAML20_PREFIX[] = UNICODE_LITERAL_4(s,a,m,l);\r
113 \r
114 const XMLCh SAMLConstants::SAML20P_PREFIX[] = UNICODE_LITERAL_5(s,a,m,l,p);\r
115 \r
116 const XMLCh SAMLConstants::SAML20MD_PREFIX[] = UNICODE_LITERAL_2(m,d);\r
117 \r
118 const XMLCh SAMLConstants::SAML20AC_PREFIX[] = UNICODE_LITERAL_2(a,c);\r
119 \r
120 const XMLCh SAMLConstants::SAML20ECP_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp\r
121 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
122   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
123   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
124   chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
125   chLatin_S, chLatin_S, chLatin_O, chColon, chLatin_e, chLatin_c, chLatin_p, chNull\r
126 };\r
127 \r
128 const XMLCh SAMLConstants::SAML20ECP_PREFIX[] = UNICODE_LITERAL_3(e,c,p);\r
129 \r
130 const XMLCh SAMLConstants::SAML20DCE_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:DCE\r
131 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
132   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
133   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
134   chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
135   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,\r
136   chLatin_D, chLatin_C, chLatin_E, chNull\r
137 };\r
138 \r
139 const XMLCh SAMLConstants::SAML20DCE_PREFIX[] = UNICODE_LITERAL_3(D,C,E);\r
140 \r
141 const XMLCh SAMLConstants::SAML20X500_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500\r
142 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
143   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
144   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
145   chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
146   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,\r
147   chLatin_X, chDigit_5, chDigit_0, chDigit_0, chNull\r
148 };\r
149 \r
150 const XMLCh SAMLConstants::SAML20X500_PREFIX[] = { chLatin_x, chDigit_5, chDigit_0, chDigit_0 };\r
151 \r
152 const XMLCh SAMLConstants::SAML20XACML_NS[] = // urn:oasis:names:tc:SAML:2.0:profiles:attribute:XACML\r
153 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
154   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
155   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
156   chLatin_p, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chLatin_s, chColon,\r
157   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_i, chLatin_b, chLatin_u, chLatin_t, chLatin_e, chColon,\r
158   chLatin_X, chLatin_A, chLatin_C, chLatin_M, chLatin_L, chNull\r
159 };\r
160 \r
161 const XMLCh SAMLConstants::SAML20XACML_PREFIX[] = UNICODE_LITERAL_9(x,a,c,m,l,p,r,o,f);\r