Settable digest algorithm, enhanced prefix handling in signatures, pending xmlsec...
[shibboleth/cpp-opensaml.git] / saml / saml1 / core / impl / AssertionsImpl.cpp
1 /*
2  *  Copyright 2001-2007 Internet2
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * AssertionsImpl.cpp
19  * 
20  * Implementation classes for SAML 1.x Assertions schema
21  */
22
23 #include "internal.h"
24 #include "exceptions.h"
25 #include "saml1/core/Assertions.h"
26
27 #include <xmltooling/AbstractComplexElement.h>
28 #include <xmltooling/AbstractSimpleElement.h>
29 #include <xmltooling/impl/AnyElement.h>
30 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
31 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
32 #include <xmltooling/util/XMLHelper.h>
33
34 #include <ctime>
35 #include <limits.h>
36 #include <xercesc/util/XMLUniDefs.hpp>
37
38 using namespace opensaml::saml1;
39 using namespace xmlsignature;
40 using namespace xmltooling;
41 using namespace std;
42 using xmlconstants::XMLSIG_NS;
43 using xmlconstants::XML_ONE;
44 using samlconstants::SAML1_NS;
45
46 #if defined (_MSC_VER)
47     #pragma warning( push )
48     #pragma warning( disable : 4250 4251 )
49 #endif
50
51 namespace opensaml {
52     namespace saml1 {
53     
54         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
55         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
56         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
57         
58         class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
59             public AbstractComplexElement,
60             public AbstractDOMCachingXMLObject,
61             public AbstractXMLObjectMarshaller,
62             public AbstractXMLObjectUnmarshaller
63         {
64         public:
65             virtual ~AudienceRestrictionConditionImpl() {}
66     
67             AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
68                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
69             }
70                 
71             AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
72                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
73                 VectorOf(Audience) v=getAudiences();
74                 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
75                     if (*i) {
76                         v.push_back((*i)->cloneAudience());
77                     }
78                 }
79             }
80             
81             IMPL_XMLOBJECT_CLONE(AudienceRestrictionCondition);
82             Condition* cloneCondition() const {
83                 return cloneAudienceRestrictionCondition();
84             }
85             IMPL_TYPED_CHILDREN(Audience,m_children.end());
86     
87         protected:
88             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
89                 PROC_TYPED_CHILDREN(Audience,SAML1_NS,false);
90                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
91             }
92         };
93
94         class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
95             public AbstractSimpleElement,
96             public AbstractDOMCachingXMLObject,
97             public AbstractXMLObjectMarshaller,
98             public AbstractXMLObjectUnmarshaller
99         {
100         public:
101             virtual ~DoNotCacheConditionImpl() {}
102     
103             DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
104                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
105             }
106                 
107             DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
108                 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
109             }
110             
111             IMPL_XMLOBJECT_CLONE(DoNotCacheCondition);
112             Condition* cloneCondition() const {
113                 return cloneDoNotCacheCondition();
114             }
115         };
116
117         class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
118             public AbstractComplexElement,
119             public AbstractDOMCachingXMLObject,
120             public AbstractXMLObjectMarshaller,
121             public AbstractXMLObjectUnmarshaller
122         {
123         public:
124             virtual ~ConditionsImpl() {
125                 delete m_NotBefore;
126                 delete m_NotOnOrAfter;
127             }
128     
129             ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
130                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
131                 init();
132             }
133                 
134             ConditionsImpl(const ConditionsImpl& src)
135                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
136                 init();
137                 setNotBefore(src.getNotBefore());
138                 setNotOnOrAfter(src.getNotOnOrAfter());
139
140                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
141                     if (*i) {
142                         AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
143                         if (arc) {
144                             getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
145                             continue;
146                         }
147     
148                         DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
149                         if (dncc) {
150                             getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
151                             continue;
152                         }
153     
154                         Condition* c=dynamic_cast<Condition*>(*i);
155                         if (c) {
156                             getConditions().push_back(c->cloneCondition());
157                             continue;
158                         }
159                     }
160                 }
161             }
162             
163             void init() {
164                 m_NotBefore=m_NotOnOrAfter=NULL;
165             }
166             
167             IMPL_XMLOBJECT_CLONE(Conditions);
168             IMPL_DATETIME_ATTRIB(NotBefore,0);
169             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
170             IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
171             IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
172             IMPL_TYPED_CHILDREN(Condition,m_children.end());
173     
174         protected:
175             void marshallAttributes(DOMElement* domElement) const {
176                 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
177                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
178             }
179     
180             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
181                 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
182                 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
183                 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
184                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
185             }
186     
187             void processAttribute(const DOMAttr* attribute) {
188                 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
189                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
190             }
191         };
192
193         class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
194             public AbstractSimpleElement,
195             public AbstractDOMCachingXMLObject,
196             public AbstractXMLObjectMarshaller,
197             public AbstractXMLObjectUnmarshaller
198         {
199         public:
200             virtual ~NameIdentifierImpl() {
201                 XMLString::release(&m_Format);
202                 XMLString::release(&m_NameQualifier);
203             }
204     
205             NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
206                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
207                 init();
208             }
209                 
210             NameIdentifierImpl(const NameIdentifierImpl& src)
211                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
212                 init();
213                 setFormat(src.getFormat());
214                 setNameQualifier(src.getNameQualifier());
215             }
216             
217             void init() {
218                 m_Format=m_NameQualifier=NULL;
219             }
220             
221             IMPL_XMLOBJECT_CLONE(NameIdentifier);
222             IMPL_STRING_ATTRIB(Format);
223             IMPL_STRING_ATTRIB(NameQualifier);
224     
225         protected:
226             void marshallAttributes(DOMElement* domElement) const {
227                 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
228                 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
229             }
230
231             void processAttribute(const DOMAttr* attribute) {
232                 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
233                 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
234             }
235         };
236
237         class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
238         {
239         public:
240             virtual ~SubjectConfirmationDataImpl() {}
241     
242             SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
243                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
244             }
245                 
246             SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AnyElementImpl(src) {
247             }
248             
249             IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
250         };
251
252         class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
253             public AbstractComplexElement,
254             public AbstractDOMCachingXMLObject,
255             public AbstractXMLObjectMarshaller,
256             public AbstractXMLObjectUnmarshaller
257         {
258         public:
259             virtual ~SubjectConfirmationImpl() {}
260     
261             SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
262                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
263                 init();
264             }
265                 
266             SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
267                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
268                 init();
269                 if (src.getSubjectConfirmationData())
270                     setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
271                 if (src.getKeyInfo())
272                     setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
273                 VectorOf(ConfirmationMethod) v=getConfirmationMethods();
274                 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
275                     if (*i) {
276                         v.push_back((*i)->cloneConfirmationMethod());
277                     }
278                 }
279             }
280             
281             void init() {
282                 m_SubjectConfirmationData=NULL;
283                 m_KeyInfo=NULL;
284                 m_children.push_back(NULL);
285                 m_children.push_back(NULL);
286                 m_pos_SubjectConfirmationData=m_children.begin();
287                 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
288                 ++m_pos_KeyInfo;
289             }
290
291             IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
292             IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
293             IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
294             IMPL_TYPED_CHILD(KeyInfo);
295     
296         protected:
297             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
298                 PROC_TYPED_CHILDREN(ConfirmationMethod,SAML1_NS,false);
299                 PROC_TYPED_CHILD(KeyInfo,XMLSIG_NS,false);
300                 
301                 // Anything else we'll assume is the data.
302                 if (getSubjectConfirmationData())
303                     throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
304                 setSubjectConfirmationData(childXMLObject);
305             }
306         };
307
308         class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
309             public AbstractComplexElement,
310             public AbstractDOMCachingXMLObject,
311             public AbstractXMLObjectMarshaller,
312             public AbstractXMLObjectUnmarshaller
313         {
314         public:
315             virtual ~SubjectImpl() {}
316     
317             SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
318                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
319                 init();
320             }
321                 
322             SubjectImpl(const SubjectImpl& src)
323                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
324                 init();
325                 if (src.getNameIdentifier())
326                     setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
327                 if (src.getSubjectConfirmation())
328                     setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
329             }
330             
331             void init() {
332                 m_NameIdentifier=NULL;
333                 m_SubjectConfirmation=NULL;
334                 m_children.push_back(NULL);
335                 m_children.push_back(NULL);
336                 m_pos_NameIdentifier=m_children.begin();
337                 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
338                 ++m_pos_SubjectConfirmation;
339             }
340
341             IMPL_XMLOBJECT_CLONE(Subject);
342             IMPL_TYPED_CHILD(NameIdentifier);
343             IMPL_TYPED_CHILD(SubjectConfirmation);
344     
345         protected:
346             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
347                 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
348                 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
349                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
350             }
351         };
352
353         class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
354             public AbstractComplexElement,
355             public AbstractDOMCachingXMLObject,
356             public AbstractXMLObjectMarshaller,
357             public AbstractXMLObjectUnmarshaller
358         {
359             void init() {
360                 m_Subject=NULL;
361                 m_children.push_back(NULL);
362                 m_pos_Subject=m_children.begin();
363             }
364         protected:
365             SubjectStatementImpl() {
366                 init();
367             }
368         public:
369             virtual ~SubjectStatementImpl() {}
370     
371             SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
372                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
373                 init();
374             }
375                 
376             SubjectStatementImpl(const SubjectStatementImpl& src)
377                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
378                 init();
379                 if (src.getSubject())
380                     setSubject(src.getSubject()->cloneSubject());
381             }
382             
383             IMPL_TYPED_CHILD(Subject);
384     
385         protected:
386             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
387                 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
388                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
389             }
390         };
391
392         class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
393             public AbstractSimpleElement,
394             public AbstractDOMCachingXMLObject,
395             public AbstractXMLObjectMarshaller,
396             public AbstractXMLObjectUnmarshaller
397         {
398         public:
399             virtual ~SubjectLocalityImpl() {
400                 XMLString::release(&m_IPAddress);
401                 XMLString::release(&m_DNSAddress);
402             }
403     
404             SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
405                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
406                 init();
407             }
408                 
409             SubjectLocalityImpl(const SubjectLocalityImpl& src)
410                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
411                 init();
412                 setIPAddress(src.getIPAddress());
413                 setDNSAddress(src.getDNSAddress());
414             }
415             
416             void init() {
417                 m_IPAddress=m_DNSAddress=NULL;
418             }
419             
420             IMPL_XMLOBJECT_CLONE(SubjectLocality);
421             IMPL_STRING_ATTRIB(IPAddress);
422             IMPL_STRING_ATTRIB(DNSAddress);
423     
424         protected:
425             void marshallAttributes(DOMElement* domElement) const {
426                 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
427                 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
428             }
429     
430             void processAttribute(const DOMAttr* attribute) {
431                 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
432                 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
433             }
434         };
435
436         class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
437             public AbstractSimpleElement,
438             public AbstractDOMCachingXMLObject,
439             public AbstractXMLObjectMarshaller,
440             public AbstractXMLObjectUnmarshaller
441         {
442         public:
443             virtual ~AuthorityBindingImpl() {
444                 delete m_AuthorityKind;
445                 XMLString::release(&m_Location);
446                 XMLString::release(&m_Binding);
447             }
448     
449             AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
450                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
451                 init();
452             }
453                 
454             AuthorityBindingImpl(const AuthorityBindingImpl& src)
455                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
456                 init();
457                 setAuthorityKind(src.getAuthorityKind());
458                 setLocation(src.getLocation());
459                 setBinding(src.getBinding());
460             }
461             
462             void init() {
463                 m_AuthorityKind=NULL;
464                 m_Location=m_Binding=NULL;
465             }
466             
467             IMPL_XMLOBJECT_CLONE(AuthorityBinding);
468             IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
469             IMPL_STRING_ATTRIB(Location);
470             IMPL_STRING_ATTRIB(Binding);
471     
472         protected:
473             void marshallAttributes(DOMElement* domElement) const {
474                 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
475                 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
476                 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
477             }
478     
479             void processAttribute(const DOMAttr* attribute) {
480                 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
481                 PROC_STRING_ATTRIB(Location,LOCATION,NULL);
482                 PROC_STRING_ATTRIB(Binding,BINDING,NULL);
483             }
484         };
485
486         class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
487         {
488         public:
489             virtual ~AuthenticationStatementImpl() {
490                 XMLString::release(&m_AuthenticationMethod);
491                 delete m_AuthenticationInstant;
492             }
493     
494             AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
495                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
496                 init();
497             }
498                 
499             AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
500                 init();
501                 setAuthenticationMethod(src.getAuthenticationMethod());
502                 setAuthenticationInstant(src.getAuthenticationInstant());
503                 if (src.getSubjectLocality())
504                     setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
505                 VectorOf(AuthorityBinding) v=getAuthorityBindings();
506                 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
507                     if (*i) {
508                         v.push_back((*i)->cloneAuthorityBinding());
509                     }
510                 }
511             }
512             
513             void init() {
514                 m_AuthenticationMethod=NULL;
515                 m_AuthenticationInstant=NULL;
516                 m_SubjectLocality=NULL;
517                 m_children.push_back(NULL);
518                 m_pos_SubjectLocality=m_pos_Subject;
519                 ++m_pos_SubjectLocality;
520             }
521             
522             IMPL_XMLOBJECT_CLONE(AuthenticationStatement);
523             SubjectStatement* cloneSubjectStatement() const {
524                 return cloneAuthenticationStatement();
525             }
526             Statement* cloneStatement() const {
527                 return cloneAuthenticationStatement();
528             }
529             IMPL_STRING_ATTRIB(AuthenticationMethod);
530             IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
531             IMPL_TYPED_CHILD(SubjectLocality);
532             IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
533     
534         protected:
535             void marshallAttributes(DOMElement* domElement) const {
536                 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
537                 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
538                 SubjectStatementImpl::marshallAttributes(domElement);
539             }
540     
541             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
542                 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
543                 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
544                 SubjectStatementImpl::processChildElement(childXMLObject,root);
545             }
546     
547             void processAttribute(const DOMAttr* attribute) {
548                 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,NULL);
549                 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,NULL);
550                 SubjectStatementImpl::processAttribute(attribute);
551             }
552         };
553
554         class SAML_DLLLOCAL ActionImpl : public virtual Action,
555             public AbstractSimpleElement,
556             public AbstractDOMCachingXMLObject,
557             public AbstractXMLObjectMarshaller,
558             public AbstractXMLObjectUnmarshaller
559         {
560         public:
561             virtual ~ActionImpl() {
562                 XMLString::release(&m_Namespace);
563             }
564     
565             ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
566                     : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
567             }
568                 
569             ActionImpl(const ActionImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
570                 setNamespace(src.getNamespace());
571             }
572             
573             IMPL_XMLOBJECT_CLONE(Action);
574             IMPL_STRING_ATTRIB(Namespace);
575     
576         protected:
577             void marshallAttributes(DOMElement* domElement) const {
578                 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
579             }
580
581             void processAttribute(const DOMAttr* attribute) {
582                 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
583             }
584         };
585
586         class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
587             public AbstractComplexElement,
588             public AbstractDOMCachingXMLObject,
589             public AbstractXMLObjectMarshaller,
590             public AbstractXMLObjectUnmarshaller
591         {
592         public:
593             virtual ~EvidenceImpl() {}
594     
595             EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
596                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
597             }
598                 
599             EvidenceImpl(const EvidenceImpl& src)
600                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
601                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
602                     if (*i) {
603                         AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
604                         if (ref) {
605                             getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
606                             continue;
607                         }
608     
609                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
610                         if (assertion) {
611                             getAssertions().push_back(assertion->cloneAssertion());
612                             continue;
613                         }
614                     }
615                 }
616             }
617             
618             IMPL_XMLOBJECT_CLONE(Evidence);
619             IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
620             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
621     
622         protected:
623             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
624                 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
625                 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
626                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
627             }
628         };
629
630         class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
631             : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
632         {
633         public:
634             virtual ~AuthorizationDecisionStatementImpl() {
635                 XMLString::release(&m_Resource);
636                 XMLString::release(&m_Decision);
637             }
638     
639             AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
640                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
641                 init();
642             }
643                 
644             AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
645                     : AbstractXMLObject(src), SubjectStatementImpl(src) {
646                 init();
647                 setResource(src.getResource());
648                 setDecision(src.getDecision());
649                 if (src.getEvidence())
650                     setEvidence(src.getEvidence()->cloneEvidence());
651                 VectorOf(Action) v=getActions();
652                 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
653                     if (*i) {
654                         v.push_back((*i)->cloneAction());
655                     }
656                 }
657             }
658             
659             void init() {
660                 m_Resource=NULL;
661                 m_Decision=NULL;
662                 m_Evidence=NULL;
663                 m_children.push_back(NULL);
664                 m_pos_Evidence=m_pos_Subject;
665                 ++m_pos_Evidence;
666             }
667             
668             IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
669             SubjectStatement* cloneSubjectStatement() const {
670                 return cloneAuthorizationDecisionStatement();
671             }
672             Statement* cloneStatement() const {
673                 return cloneAuthorizationDecisionStatement();
674             }
675             IMPL_STRING_ATTRIB(Resource);
676             IMPL_STRING_ATTRIB(Decision);
677             IMPL_TYPED_CHILD(Evidence);
678             IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
679     
680         protected:
681             void marshallAttributes(DOMElement* domElement) const {
682                 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
683                 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
684                 SubjectStatementImpl::marshallAttributes(domElement);
685             }
686     
687             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
688                 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
689                 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
690                 SubjectStatementImpl::processChildElement(childXMLObject,root);
691             }
692     
693             void processAttribute(const DOMAttr* attribute) {
694                 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
695                 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
696                 SubjectStatementImpl::processAttribute(attribute);
697             }
698         };
699
700         class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
701             public AbstractSimpleElement,
702             public AbstractDOMCachingXMLObject,
703             public AbstractXMLObjectMarshaller,
704             public AbstractXMLObjectUnmarshaller
705         {
706         public:
707             virtual ~AttributeDesignatorImpl() {
708                 XMLString::release(&m_AttributeName);
709                 XMLString::release(&m_AttributeNamespace);
710             }
711     
712             AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
713                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
714                 init();
715             }
716                 
717             AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
718                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
719                 init();
720                 setAttributeName(src.getAttributeName());
721                 setAttributeNamespace(src.getAttributeNamespace());
722             }
723             
724             void init() {
725                 m_AttributeName=m_AttributeNamespace=NULL;
726             }
727             
728             IMPL_XMLOBJECT_CLONE(AttributeDesignator);
729             IMPL_STRING_ATTRIB(AttributeName);
730             IMPL_STRING_ATTRIB(AttributeNamespace);
731     
732         protected:
733             void marshallAttributes(DOMElement* domElement) const {
734                 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
735                 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
736             }
737     
738             void processAttribute(const DOMAttr* attribute) {
739                 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
740                 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
741             }
742         };
743
744         class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
745             public AbstractComplexElement,
746             public AbstractDOMCachingXMLObject,
747             public AbstractXMLObjectMarshaller,
748             public AbstractXMLObjectUnmarshaller
749         {
750         public:
751             virtual ~AttributeImpl() {
752                 XMLString::release(&m_AttributeName);
753                 XMLString::release(&m_AttributeNamespace);
754             }
755     
756             AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
757                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
758                 init();
759             }
760                 
761             AttributeImpl(const AttributeImpl& src)
762                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
763                 init();
764                 setAttributeName(src.getAttributeName());
765                 setAttributeNamespace(src.getAttributeNamespace());
766                 VectorOf(XMLObject) v=getAttributeValues();
767                 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
768                     if (*i) {
769                         v.push_back((*i)->clone());
770                     }
771                 }
772             }
773             
774             void init() {
775                 m_AttributeName=m_AttributeNamespace=NULL;
776             }
777             
778             IMPL_XMLOBJECT_CLONE(Attribute);
779             AttributeDesignator* cloneAttributeDesignator() const {
780                 return cloneAttribute();
781             }
782             IMPL_STRING_ATTRIB(AttributeName);
783             IMPL_STRING_ATTRIB(AttributeNamespace);
784             IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
785     
786         protected:
787             void marshallAttributes(DOMElement* domElement) const {
788                 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
789                 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
790             }
791
792             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
793                 getAttributeValues().push_back(childXMLObject);
794             }
795
796             void processAttribute(const DOMAttr* attribute) {
797                 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
798                 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
799             }
800         };
801
802         class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
803         {
804         public:
805             virtual ~AttributeValueImpl() {}
806     
807             AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
808                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
809             }
810                 
811             AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {}
812             
813             IMPL_XMLOBJECT_CLONE(AttributeValue);
814         };
815
816         class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
817         {
818         public:
819             virtual ~AttributeStatementImpl() {}
820     
821             AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
822                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
823             }
824                 
825             AttributeStatementImpl(const AttributeStatementImpl& src)
826                     : AbstractXMLObject(src), SubjectStatementImpl(src) {
827                 VectorOf(Attribute) v=getAttributes();
828                 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
829                     if (*i) {
830                         v.push_back((*i)->cloneAttribute());
831                     }
832                 }
833             }
834             
835             IMPL_XMLOBJECT_CLONE(AttributeStatement);
836             SubjectStatement* cloneSubjectStatement() const {
837                 return cloneAttributeStatement();
838             }
839             Statement* cloneStatement() const {
840                 return cloneAttributeStatement();
841             }
842             IMPL_TYPED_CHILDREN(Attribute, m_children.end());
843     
844         protected:
845             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
846                 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
847                 SubjectStatementImpl::processChildElement(childXMLObject,root);
848             }
849         };
850
851         class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
852             public AbstractComplexElement,
853             public AbstractDOMCachingXMLObject,
854             public AbstractXMLObjectMarshaller,
855             public AbstractXMLObjectUnmarshaller
856         {
857         public:
858             virtual ~AdviceImpl() {}
859     
860             AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
861                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
862             }
863                 
864             AdviceImpl(const AdviceImpl& src)
865                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
866                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
867                     if (*i) {
868                         AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
869                         if (ref) {
870                             getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
871                             continue;
872                         }
873     
874                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
875                         if (assertion) {
876                             getAssertions().push_back(assertion->cloneAssertion());
877                             continue;
878                         }
879     
880                         getUnknownXMLObjects().push_back((*i)->clone());
881                     }
882                 }
883             }
884             
885             IMPL_XMLOBJECT_CLONE(Advice);
886             IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
887             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
888             IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
889     
890         protected:
891             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
892                 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
893                 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
894                 
895                 // Unknown child.
896                 const XMLCh* nsURI=root->getNamespaceURI();
897                 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
898                     getUnknownXMLObjects().push_back(childXMLObject);
899                     return;
900                 }
901                 
902                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
903             }
904         };
905
906         class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
907             public AbstractComplexElement,
908             public AbstractDOMCachingXMLObject,
909             public AbstractXMLObjectMarshaller,
910             public AbstractXMLObjectUnmarshaller
911         {
912             void init() {
913                 m_MinorVersion=NULL;
914                 m_AssertionID=NULL;
915                 m_Issuer=NULL;
916                 m_IssueInstant=NULL;
917                 m_children.push_back(NULL);
918                 m_children.push_back(NULL);
919                 m_children.push_back(NULL);
920                 m_Conditions=NULL;
921                 m_Advice=NULL;
922                 m_Signature=NULL;
923                 m_pos_Conditions=m_children.begin();
924                 m_pos_Advice=m_pos_Conditions;
925                 ++m_pos_Advice;
926                 m_pos_Signature=m_pos_Advice;
927                 ++m_pos_Signature;
928             }
929         public:
930             virtual ~AssertionImpl() {
931                 XMLString::release(&m_MinorVersion);
932                 XMLString::release(&m_AssertionID);
933                 XMLString::release(&m_Issuer);
934                 delete m_IssueInstant;
935             }
936     
937             AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
938                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
939                 init();
940             }
941                 
942             AssertionImpl(const AssertionImpl& src)
943                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
944                 init();
945                 setMinorVersion(src.m_MinorVersion);
946                 setAssertionID(src.getAssertionID());
947                 setIssuer(src.getIssuer());
948                 setIssueInstant(src.getIssueInstant());
949                 if (src.getConditions())
950                     setConditions(src.getConditions()->cloneConditions());
951                 if (src.getAdvice())
952                     setAdvice(src.getAdvice()->cloneAdvice());
953                 if (src.getSignature())
954                     setSignature(src.getSignature()->cloneSignature());
955                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
956                     if (*i) {
957                         AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
958                         if (authst) {
959                             getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
960                             continue;
961                         }
962
963                         AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
964                         if (attst) {
965                             getAttributeStatements().push_back(attst->cloneAttributeStatement());
966                             continue;
967                         }
968
969                         AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
970                         if (authzst) {
971                             getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
972                             continue;
973                         }
974     
975                         SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
976                         if (subst) {
977                             getSubjectStatements().push_back(subst->cloneSubjectStatement());
978                             continue;
979                         }
980     
981                         Statement* st=dynamic_cast<Statement*>(*i);
982                         if (st) {
983                             getStatements().push_back(st->cloneStatement());
984                             continue;
985                         }
986                     }
987                 }
988             }
989             
990             //IMPL_TYPED_CHILD(Signature);
991             // Need customized setter.
992         protected:
993             Signature* m_Signature;
994             list<XMLObject*>::iterator m_pos_Signature;
995         public:
996             Signature* getSignature() const {
997                 return m_Signature;
998             }
999             
1000             void setSignature(Signature* sig) {
1001                 prepareForAssignment(m_Signature,sig);
1002                 *m_pos_Signature=m_Signature=sig;
1003                 // Sync content reference back up.
1004                 if (m_Signature)
1005                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
1006             }
1007             
1008             IMPL_XMLOBJECT_CLONE(Assertion);
1009             IMPL_INTEGER_ATTRIB(MinorVersion);
1010             IMPL_STRING_ATTRIB(AssertionID);    // have to special-case getXMLID
1011             const XMLCh* getXMLID() const {
1012                 pair<bool,int> v = getMinorVersion();
1013                 return (!v.first || v.second > 0) ? m_AssertionID : NULL;
1014             }
1015             const XMLCh* getID() const {
1016                 return getAssertionID();
1017             }
1018             IMPL_STRING_ATTRIB(Issuer);
1019             IMPL_DATETIME_ATTRIB(IssueInstant,0);
1020             IMPL_TYPED_CHILD(Conditions);
1021             IMPL_TYPED_CHILD(Advice);
1022             IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1023             IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1024             IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1025             IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1026             IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1027     
1028         protected:
1029             void marshallAttributes(DOMElement* domElement) const {
1030                 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1031                 domElement->setAttributeNS(NULL,MAJORVERSION,XML_ONE);
1032                 if (!m_MinorVersion)
1033                     const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1034                 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1035                 if (!m_AssertionID)
1036                     const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1037                 domElement->setAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME, m_AssertionID);
1038                 if (*m_MinorVersion!=chDigit_0)
1039                     domElement->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME);
1040                 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,NULL);
1041                 if (!m_IssueInstant) {
1042                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1043                     const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1044                 }
1045                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1046             }
1047     
1048             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1049                 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1050                 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1051                 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1052                 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1053                 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1054                 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1055                 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1056                 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1057                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1058             }
1059     
1060             void unmarshallAttributes(const DOMElement* domElement) {
1061                 // Standard processing, but then we check IDness.
1062                 AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
1063                 if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0))
1064                     const_cast<DOMElement*>(domElement)->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME);
1065             }
1066
1067             void processAttribute(const DOMAttr* attribute) {
1068                 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1069                 if (XMLHelper::isNodeNamed(attribute,NULL,MAJORVERSION)) {
1070                     if (!XMLString::equals(attribute->getValue(),XML_ONE))
1071                         throw UnmarshallingException("Assertion has invalid major version.");
1072                 }
1073                 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,NULL);
1074                 PROC_STRING_ATTRIB(AssertionID,ASSERTIONID,NULL);
1075                 PROC_STRING_ATTRIB(Issuer,ISSUER,NULL);
1076                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1077             }
1078         };
1079     
1080     };
1081 };
1082
1083 #if defined (_MSC_VER)
1084     #pragma warning( pop )
1085 #endif
1086
1087 // Builder Implementations
1088
1089 IMPL_XMLOBJECTBUILDER(Action);
1090 IMPL_XMLOBJECTBUILDER(Advice);
1091 IMPL_XMLOBJECTBUILDER(Assertion);
1092 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1093 IMPL_XMLOBJECTBUILDER(Attribute);
1094 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1095 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1096 IMPL_XMLOBJECTBUILDER(AttributeValue);
1097 IMPL_XMLOBJECTBUILDER(Audience);
1098 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1099 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1100 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1101 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1102 IMPL_XMLOBJECTBUILDER(Conditions);
1103 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1104 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1105 IMPL_XMLOBJECTBUILDER(Evidence);
1106 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1107 IMPL_XMLOBJECTBUILDER(Subject);
1108 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1109 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1110 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1111
1112 // Unicode literals
1113 const XMLCh Action::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,c,t,i,o,n);
1114 const XMLCh Action::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1115 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] =       UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1116 const XMLCh Advice::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,d,v,i,c,e);
1117 const XMLCh Advice::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1118 const XMLCh Assertion::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1119 const XMLCh Assertion::TYPE_NAME[] =                UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1120 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1121 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] =  UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1122 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] =       UNICODE_LITERAL_6(I,s,s,u,e,r);
1123 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1124 const XMLCh AssertionIDReference::LOCAL_NAME[] =    UNICODE_LITERAL_20(A,s,s,e,r,t,i,o,n,I,D,R,e,f,e,r,e,n,c,e);
1125 const XMLCh Attribute::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1126 const XMLCh Attribute::TYPE_NAME[] =                UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1127 const XMLCh AttributeDesignator::LOCAL_NAME[] =     UNICODE_LITERAL_19(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r);
1128 const XMLCh AttributeDesignator::TYPE_NAME[] =      UNICODE_LITERAL_23(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r,T,y,p,e);
1129 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] =              UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1130 const XMLCh AttributeDesignator::ATTRIBUTENAMESPACE_ATTRIB_NAME[] =         UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,N,a,m,e,s,p,a,c,e);
1131 const XMLCh AttributeStatement::LOCAL_NAME[] =      UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t);
1132 const XMLCh AttributeStatement::TYPE_NAME[] =       UNICODE_LITERAL_22(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t,T,y,p,e);
1133 const XMLCh AttributeValue::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1134 const XMLCh Audience::LOCAL_NAME[] =                UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1135 const XMLCh AudienceRestrictionCondition::LOCAL_NAME[] =    UNICODE_LITERAL_28(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n);
1136 const XMLCh AudienceRestrictionCondition::TYPE_NAME[] =     UNICODE_LITERAL_32(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n,T,y,p,e);
1137 const XMLCh AuthenticationStatement::LOCAL_NAME[] = UNICODE_LITERAL_23(A,u,t,h,e,n,t,i,c,a,t,i,o,n,S,t,a,t,e,m,e,n,t);
1138 const XMLCh AuthenticationStatement::TYPE_NAME[] =  UNICODE_LITERAL_27(A,u,t,h,e,n,t,i,c,a,t,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1139 const XMLCh AuthenticationStatement::AUTHENTICATIONMETHOD_ATTRIB_NAME[] =   UNICODE_LITERAL_20(A,u,t,h,e,n,t,i,c,a,t,i,o,n,M,e,t,h,o,d);
1140 const XMLCh AuthenticationStatement::AUTHENTICATIONINSTANT_ATTRIB_NAME[] =  UNICODE_LITERAL_21(A,u,t,h,e,n,t,i,c,a,t,i,o,n,I,n,s,t,a,n,t);
1141 const XMLCh AuthorityBinding::LOCAL_NAME[] =        UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1142 const XMLCh AuthorityBinding::TYPE_NAME[] =         UNICODE_LITERAL_20(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g,T,y,p,e);
1143 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1144 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] =      UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1145 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] =       UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1146 const XMLCh AuthorizationDecisionStatement::LOCAL_NAME[] =  UNICODE_LITERAL_30(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
1147 const XMLCh AuthorizationDecisionStatement::TYPE_NAME[] =   UNICODE_LITERAL_34(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1148 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] =        UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1149 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] =        UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1150 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] =             UNICODE_LITERAL_6(P,e,r,m,i,t);
1151 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] =               UNICODE_LITERAL_4(D,e,n,y);
1152 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] =      UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1153 const XMLCh Condition::LOCAL_NAME[] =               UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1154 const XMLCh Conditions::LOCAL_NAME[] =              UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1155 const XMLCh Conditions::TYPE_NAME[] =               UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1156 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] =   UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1157 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1158 const XMLCh ConfirmationMethod::LOCAL_NAME[] =      UNICODE_LITERAL_18(C,o,n,f,i,r,m,a,t,i,o,n,M,e,t,h,o,d);
1159 const XMLCh DoNotCacheCondition::LOCAL_NAME[] =     UNICODE_LITERAL_19(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n);
1160 const XMLCh DoNotCacheCondition::TYPE_NAME[] =      UNICODE_LITERAL_23(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n,T,y,p,e);
1161 const XMLCh Evidence::LOCAL_NAME[] =                UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1162 const XMLCh Evidence::TYPE_NAME[] =                 UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1163 const XMLCh NameIdentifier::LOCAL_NAME[] =          UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1164 const XMLCh NameIdentifier::TYPE_NAME[] =           UNICODE_LITERAL_18(N,a,m,e,I,d,e,n,t,i,f,i,e,r,T,y,p,e);
1165 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] =   UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1166 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] =  UNICODE_LITERAL_6(F,o,r,m,a,t);
1167 const XMLCh Statement::LOCAL_NAME[] =               UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1168 const XMLCh Subject::LOCAL_NAME[] =                 UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1169 const XMLCh Subject::TYPE_NAME[] =                  UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1170 const XMLCh SubjectConfirmation::LOCAL_NAME[] =     UNICODE_LITERAL_19(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n);
1171 const XMLCh SubjectConfirmation::TYPE_NAME[] =      UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,T,y,p,e);
1172 const XMLCh SubjectConfirmationData::LOCAL_NAME[] = UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a);
1173 const XMLCh SubjectLocality::LOCAL_NAME[] =         UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1174 const XMLCh SubjectLocality::TYPE_NAME[] =          UNICODE_LITERAL_19(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y,T,y,p,e);
1175 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] =      UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1176 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] =     UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1177 const XMLCh SubjectStatement::LOCAL_NAME[] =        UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1178
1179 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1180 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1181   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1182   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1183   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1184   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1185   chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull
1186 };
1187
1188 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1189 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1190   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1191   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1192   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1193   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1194   chLatin_e, chLatin_m, chLatin_a, chLatin_i, chLatin_l, chLatin_A, chLatin_d, chLatin_d, chLatin_r, chLatin_e, chLatin_s, chLatin_s, chNull
1195 };
1196
1197 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1198 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1199   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1200   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1201   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1202   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1203   chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1204   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1205 };
1206
1207 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1208 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1209   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1210   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1211   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1212   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1213   chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1214   chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1215   chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1216   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1217 };
1218
1219 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1220 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1221   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1222   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1223   chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1224       chDash, chDigit_0, chDigit_1, chNull
1225 };
1226
1227 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1228 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1229   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1230   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1231   chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1232 };
1233
1234 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1235 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1236   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1237   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1238   chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1239 };
1240
1241 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1242 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1243   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1244   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1245   chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1246       chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1247 };
1248
1249 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1250 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1251   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1252   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1253   chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1254       chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1255 };
1256
1257 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1258 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1259   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1260   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1261   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1262   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1263 };
1264
1265 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1266 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1267   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1268   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1269   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1270   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1271   chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1272 };
1273
1274 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1275 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1276   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1277   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1278   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1279   chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1280 };
1281
1282 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1283 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1284   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1285   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1286   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1287   chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1288 };