2 * Copyright 2001-2007 Internet2
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * Assertions20Impl.cpp
20 * Implementation classes for SAML 2.0 Assertions schema
24 #include "exceptions.h"
25 #include "saml/encryption/EncryptedKeyResolver.h"
26 #include "saml2/core/Assertions.h"
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractSimpleElement.h>
30 #include <xmltooling/impl/AnyElement.h>
31 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
32 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
33 #include <xmltooling/util/XMLHelper.h>
36 #include <xercesc/util/XMLUniDefs.hpp>
38 using namespace opensaml::saml2;
39 using namespace xmlencryption;
40 using namespace xmlsignature;
41 using namespace xmltooling;
43 using xmlconstants::XSI_NS;
44 using xmlconstants::XMLSIG_NS;
45 using xmlconstants::XMLENC_NS;
46 using xmlconstants::XML_BOOL_NULL;
47 using samlconstants::SAML20_NS;
50 #if defined (_MSC_VER)
51 #pragma warning( push )
52 #pragma warning( disable : 4250 4251 )
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDRef);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionURIRef);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextClassRef);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextDeclRef);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthenticatingAuthority);
65 class SAML_DLLLOCAL NameIDTypeImpl : public virtual NameIDType,
66 public AbstractSimpleElement,
67 public AbstractDOMCachingXMLObject,
68 public AbstractXMLObjectMarshaller,
69 public AbstractXMLObjectUnmarshaller
72 m_Format=m_SPProvidedID=m_NameQualifier=m_SPNameQualifier=NULL;
81 virtual ~NameIDTypeImpl() {
82 XMLString::release(&m_NameQualifier);
83 XMLString::release(&m_SPNameQualifier);
84 XMLString::release(&m_Format);
85 XMLString::release(&m_SPProvidedID);
88 NameIDTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
89 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
93 NameIDTypeImpl(const NameIDTypeImpl& src)
94 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
96 setNameQualifier(src.getNameQualifier());
97 setSPNameQualifier(src.getSPNameQualifier());
98 setFormat(src.getFormat());
99 setSPProvidedID(src.getSPProvidedID());
102 IMPL_XMLOBJECT_CLONE(NameIDType);
103 IMPL_STRING_ATTRIB(NameQualifier);
104 IMPL_STRING_ATTRIB(SPNameQualifier);
105 IMPL_STRING_ATTRIB(Format);
106 IMPL_STRING_ATTRIB(SPProvidedID);
109 void marshallAttributes(DOMElement* domElement) const {
110 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
111 MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
112 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
113 MARSHALL_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
116 void processAttribute(const DOMAttr* attribute) {
117 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
118 PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
119 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
120 PROC_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
121 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
125 class SAML_DLLLOCAL NameIDImpl : public virtual NameID, public NameIDTypeImpl
128 virtual ~NameIDImpl() {}
130 NameIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
131 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
133 NameIDImpl(const NameIDImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
135 IMPL_XMLOBJECT_CLONE(NameID);
136 NameIDType* cloneNameIDType() const {
137 return new NameIDImpl(*this);
141 class SAML_DLLLOCAL IssuerImpl : public virtual Issuer, public NameIDTypeImpl
144 virtual ~IssuerImpl() {}
146 IssuerImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
147 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
149 IssuerImpl(const IssuerImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
151 IMPL_XMLOBJECT_CLONE(Issuer);
152 NameIDType* cloneNameIDType() const {
153 return new IssuerImpl(*this);
157 //TODO unit test for this
158 // - need to test encryption/decryption too, or already done in xmltooling ?
159 class SAML_DLLLOCAL EncryptedElementTypeImpl : public virtual EncryptedElementType,
160 public AbstractComplexElement,
161 public AbstractDOMCachingXMLObject,
162 public AbstractXMLObjectMarshaller,
163 public AbstractXMLObjectUnmarshaller
166 m_EncryptedData=NULL;
167 m_children.push_back(NULL);
168 m_pos_EncryptedData=m_children.begin();
172 EncryptedElementTypeImpl() {
177 virtual ~EncryptedElementTypeImpl() {}
179 EncryptedElementTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
180 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
184 EncryptedElementTypeImpl(const EncryptedElementTypeImpl& src)
185 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
187 if (src.getEncryptedData())
188 setEncryptedData(src.getEncryptedData()->cloneEncryptedData());
189 VectorOf(EncryptedKey) v=getEncryptedKeys();
190 for (vector<EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {
192 v.push_back((*i)->cloneEncryptedKey());
197 IMPL_XMLOBJECT_CLONE(EncryptedElementType);
198 IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
199 IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
202 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
203 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
204 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
205 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
209 class SAML_DLLLOCAL EncryptedIDImpl : public virtual EncryptedID, public EncryptedElementTypeImpl
212 virtual ~EncryptedIDImpl() {}
214 EncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
215 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
217 EncryptedIDImpl(const EncryptedIDImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
219 IMPL_XMLOBJECT_CLONE(EncryptedID);
220 EncryptedElementType* cloneEncryptedElementType() const {
221 return new EncryptedIDImpl(*this);
225 class SAML_DLLLOCAL ConditionImpl : public virtual Condition, public AnyElementImpl
228 virtual ~ConditionImpl() {}
230 ConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
231 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
234 ConditionImpl(const ConditionImpl& src) : AnyElementImpl(src) {}
236 IMPL_XMLOBJECT_CLONE(Condition);
239 class SAML_DLLLOCAL AudienceRestrictionImpl : public virtual AudienceRestriction,
240 public AbstractComplexElement,
241 public AbstractDOMCachingXMLObject,
242 public AbstractXMLObjectMarshaller,
243 public AbstractXMLObjectUnmarshaller
246 virtual ~AudienceRestrictionImpl() {}
248 AudienceRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
249 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
252 AudienceRestrictionImpl(const AudienceRestrictionImpl& src)
253 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
254 VectorOf(Audience) v=getAudiences();
255 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
257 v.push_back((*i)->cloneAudience());
262 IMPL_XMLOBJECT_CLONE(AudienceRestriction);
263 Condition* cloneCondition() const {
264 return cloneAudienceRestriction();
266 IMPL_TYPED_CHILDREN(Audience,m_children.end());
269 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
270 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
271 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
275 class SAML_DLLLOCAL OneTimeUseImpl : public virtual OneTimeUse,
276 public AbstractSimpleElement,
277 public AbstractDOMCachingXMLObject,
278 public AbstractXMLObjectMarshaller,
279 public AbstractXMLObjectUnmarshaller
282 virtual ~OneTimeUseImpl() {}
284 OneTimeUseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
285 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
288 OneTimeUseImpl(const OneTimeUseImpl& src)
289 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
292 IMPL_XMLOBJECT_CLONE(OneTimeUse);
293 Condition* cloneCondition() const {
294 return cloneOneTimeUse();
298 class SAML_DLLLOCAL ProxyRestrictionImpl : public virtual ProxyRestriction,
299 public AbstractComplexElement,
300 public AbstractDOMCachingXMLObject,
301 public AbstractXMLObjectMarshaller,
302 public AbstractXMLObjectUnmarshaller
305 virtual ~ProxyRestrictionImpl() {
306 XMLString::release(&m_Count);
309 ProxyRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
310 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
314 ProxyRestrictionImpl(const ProxyRestrictionImpl& src)
315 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
316 setCount(src.m_Count);
317 VectorOf(Audience) v=getAudiences();
318 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
320 v.push_back((*i)->cloneAudience());
325 IMPL_XMLOBJECT_CLONE(ProxyRestriction);
326 Condition* cloneCondition() const {
327 return cloneProxyRestriction();
329 IMPL_TYPED_CHILDREN(Audience,m_children.end());
330 IMPL_INTEGER_ATTRIB(Count);
333 void marshallAttributes(DOMElement* domElement) const {
334 MARSHALL_INTEGER_ATTRIB(Count,COUNT,NULL);
337 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
338 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
339 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
342 void processAttribute(const DOMAttr* attribute) {
343 PROC_INTEGER_ATTRIB(Count,COUNT,NULL);
344 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
349 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
350 public AbstractComplexElement,
351 public AbstractDOMCachingXMLObject,
352 public AbstractXMLObjectMarshaller,
353 public AbstractXMLObjectUnmarshaller
356 m_NotBefore=m_NotOnOrAfter=NULL;
359 virtual ~ConditionsImpl() {
361 delete m_NotOnOrAfter;
364 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
365 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
369 ConditionsImpl(const ConditionsImpl& src)
370 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
372 setNotBefore(src.getNotBefore());
373 setNotOnOrAfter(src.getNotOnOrAfter());
375 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
377 AudienceRestriction* arc=dynamic_cast<AudienceRestriction*>(*i);
379 getAudienceRestrictions().push_back(arc->cloneAudienceRestriction());
383 OneTimeUse* dncc=dynamic_cast<OneTimeUse*>(*i);
385 getOneTimeUses().push_back(dncc->cloneOneTimeUse());
389 ProxyRestriction* prc=dynamic_cast<ProxyRestriction*>(*i);
391 getProxyRestrictions().push_back(prc->cloneProxyRestriction());
395 Condition* c=dynamic_cast<Condition*>(*i);
397 getConditions().push_back(c->cloneCondition());
404 IMPL_XMLOBJECT_CLONE(Conditions);
405 IMPL_DATETIME_ATTRIB(NotBefore,0);
406 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
407 IMPL_TYPED_CHILDREN(AudienceRestriction, m_children.end());
408 IMPL_TYPED_CHILDREN(OneTimeUse,m_children.end());
409 IMPL_TYPED_CHILDREN(ProxyRestriction, m_children.end());
410 IMPL_TYPED_CHILDREN(Condition,m_children.end());
413 void marshallAttributes(DOMElement* domElement) const {
414 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
415 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
418 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
419 PROC_TYPED_CHILDREN(AudienceRestriction,SAML20_NS,false);
420 PROC_TYPED_CHILDREN(OneTimeUse,SAML20_NS,false);
421 PROC_TYPED_CHILDREN(ProxyRestriction,SAML20_NS,false);
422 PROC_TYPED_CHILDREN(Condition,SAML20_NS,false);
423 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
426 void processAttribute(const DOMAttr* attribute) {
427 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
428 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
429 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
433 class SAML_DLLLOCAL SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType, public virtual AbstractXMLObject
436 m_NotBefore=m_NotOnOrAfter=NULL;
437 m_Recipient=m_InResponseTo=m_Address=NULL;
441 SubjectConfirmationDataTypeImpl() {
446 virtual ~SubjectConfirmationDataTypeImpl() {
448 delete m_NotOnOrAfter;
449 XMLString::release(&m_Recipient);
450 XMLString::release(&m_InResponseTo);
451 XMLString::release(&m_Address);
454 SubjectConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
455 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
459 SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractXMLObject(src) {
461 setNotBefore(src.getNotBefore());
462 setNotOnOrAfter(src.getNotOnOrAfter());
463 setRecipient(src.getRecipient());
464 setInResponseTo(src.getInResponseTo());
465 setAddress(src.getAddress());
468 IMPL_DATETIME_ATTRIB(NotBefore,0);
469 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
470 IMPL_STRING_ATTRIB(Recipient);
471 IMPL_STRING_ATTRIB(InResponseTo);
472 IMPL_STRING_ATTRIB(Address);
475 void marshallAttributes(DOMElement* domElement) const {
476 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
477 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
478 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
479 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
480 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
483 void processAttribute(const DOMAttr* attribute) {
484 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
485 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
486 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
487 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
488 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
492 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public SubjectConfirmationData,
493 public SubjectConfirmationDataTypeImpl, public AnyElementImpl
496 virtual ~SubjectConfirmationDataImpl() {}
498 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
499 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
502 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
503 : SubjectConfirmationDataTypeImpl(src), AnyElementImpl(src) {
506 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
507 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
508 return new SubjectConfirmationDataImpl(*this);
511 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
512 if (!qualifiedName.hasNamespaceURI()) {
513 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
517 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
518 setNotOnOrAfter(value);
521 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
525 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
526 setInResponseTo(value);
529 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
534 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
538 void marshallAttributes(DOMElement* domElement) const {
539 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
540 AnyElementImpl::marshallAttributes(domElement);
543 void processAttribute(const DOMAttr* attribute) {
544 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
545 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
546 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
547 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
548 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
549 AnyElementImpl::processAttribute(attribute);
553 class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
554 public SubjectConfirmationDataTypeImpl,
555 public AbstractComplexElement,
556 public AbstractAttributeExtensibleXMLObject,
557 public AbstractDOMCachingXMLObject,
558 public AbstractXMLObjectMarshaller,
559 public AbstractXMLObjectUnmarshaller
562 virtual ~KeyInfoConfirmationDataTypeImpl() {}
564 KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
565 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
568 KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
569 : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src),
570 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
571 VectorOf(KeyInfo) v=getKeyInfos();
572 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
573 v.push_back((*i)->cloneKeyInfo());
576 IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
577 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
578 return new KeyInfoConfirmationDataTypeImpl(*this);
581 IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
584 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
585 if (!qualifiedName.hasNamespaceURI()) {
586 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
590 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
591 setNotOnOrAfter(value);
594 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
598 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
599 setInResponseTo(value);
602 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
607 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
611 void marshallAttributes(DOMElement* domElement) const {
612 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
613 marshallExtensionAttributes(domElement);
616 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
617 PROC_TYPED_CHILDREN(KeyInfo,XMLSIG_NS,false);
618 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
621 void processAttribute(const DOMAttr* attribute) {
622 unmarshallExtensionAttribute(attribute);
626 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
627 public AbstractComplexElement,
628 public AbstractDOMCachingXMLObject,
629 public AbstractXMLObjectMarshaller,
630 public AbstractXMLObjectUnmarshaller
637 m_SubjectConfirmationData=NULL;
638 m_children.push_back(NULL);
639 m_children.push_back(NULL);
640 m_children.push_back(NULL);
641 m_children.push_back(NULL);
642 m_pos_BaseID=m_children.begin();
643 m_pos_NameID=m_pos_BaseID;
645 m_pos_EncryptedID=m_pos_NameID;
647 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
648 ++m_pos_SubjectConfirmationData;
651 virtual ~SubjectConfirmationImpl() {}
653 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
654 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
658 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
659 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
661 setMethod(src.getMethod());
663 setBaseID(src.getBaseID()->cloneBaseID());
665 setNameID(src.getNameID()->cloneNameID());
666 if (src.getEncryptedID())
667 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
668 if (src.getSubjectConfirmationData())
669 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
672 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
673 IMPL_STRING_ATTRIB(Method);
674 IMPL_TYPED_CHILD(BaseID);
675 IMPL_TYPED_CHILD(NameID);
676 IMPL_TYPED_CHILD(EncryptedID);
677 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
680 void marshallAttributes(DOMElement* domElement) const {
681 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
684 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
685 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
686 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
687 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
688 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
689 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
692 void processAttribute(const DOMAttr* attribute) {
693 PROC_STRING_ATTRIB(Method,METHOD,NULL);
694 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
698 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
699 public AbstractComplexElement,
700 public AbstractDOMCachingXMLObject,
701 public AbstractXMLObjectMarshaller,
702 public AbstractXMLObjectUnmarshaller
708 m_children.push_back(NULL);
709 m_children.push_back(NULL);
710 m_children.push_back(NULL);
711 m_pos_BaseID=m_children.begin();
712 m_pos_NameID=m_pos_BaseID;
714 m_pos_EncryptedID=m_pos_NameID;
718 virtual ~SubjectImpl() {}
720 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
721 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
725 SubjectImpl(const SubjectImpl& src)
726 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
729 setBaseID(src.getBaseID()->cloneBaseID());
731 setNameID(src.getNameID()->cloneNameID());
732 if (src.getEncryptedID())
733 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
734 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
735 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
737 v.push_back((*i)->cloneSubjectConfirmation());
742 IMPL_XMLOBJECT_CLONE(Subject);
743 IMPL_TYPED_CHILD(NameID);
744 IMPL_TYPED_CHILD(BaseID);
745 IMPL_TYPED_CHILD(EncryptedID);
746 IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
749 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
750 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
751 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
752 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
753 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
754 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
758 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
759 public AbstractSimpleElement,
760 public AbstractDOMCachingXMLObject,
761 public AbstractXMLObjectMarshaller,
762 public AbstractXMLObjectUnmarshaller
765 m_Address=m_DNSName=NULL;
768 virtual ~SubjectLocalityImpl() {
769 XMLString::release(&m_Address);
770 XMLString::release(&m_DNSName);
773 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
774 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
778 SubjectLocalityImpl(const SubjectLocalityImpl& src)
779 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
781 setAddress(src.getAddress());
782 setDNSName(src.getDNSName());
785 IMPL_XMLOBJECT_CLONE(SubjectLocality);
786 IMPL_STRING_ATTRIB(Address);
787 IMPL_STRING_ATTRIB(DNSName);
790 void marshallAttributes(DOMElement* domElement) const {
791 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
792 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
795 void processAttribute(const DOMAttr* attribute) {
796 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
797 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
798 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
802 class SAML_DLLLOCAL StatementImpl : public virtual Statement, public AnyElementImpl
805 virtual ~StatementImpl() {}
807 StatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
808 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
811 StatementImpl(const StatementImpl& src) : AnyElementImpl(src) {}
813 IMPL_XMLOBJECT_CLONE(Statement);
816 //TODO need unit test for this
817 class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
820 virtual ~AuthnContextDeclImpl() {}
822 AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
823 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
826 AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
829 IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
832 class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
833 public AbstractComplexElement,
834 public AbstractDOMCachingXMLObject,
835 public AbstractXMLObjectMarshaller,
836 public AbstractXMLObjectUnmarshaller
839 m_AuthnContextClassRef=NULL;
840 m_AuthnContextDecl=NULL;
841 m_AuthnContextDeclRef=NULL;
842 m_children.push_back(NULL);
843 m_children.push_back(NULL);
844 m_children.push_back(NULL);
845 m_pos_AuthnContextClassRef=m_children.begin();
846 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
847 ++m_pos_AuthnContextDecl;
848 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
849 ++m_pos_AuthnContextDeclRef;
852 virtual ~AuthnContextImpl() {}
854 AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
855 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
859 AuthnContextImpl(const AuthnContextImpl& src)
860 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
862 if (src.getAuthnContextClassRef())
863 setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
864 if (src.getAuthnContextDecl())
865 setAuthnContextDecl(src.getAuthnContextDecl()->clone());
866 if (src.getAuthnContextDeclRef())
867 setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
868 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
869 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
871 v.push_back((*i)->cloneAuthenticatingAuthority());
876 IMPL_XMLOBJECT_CLONE(AuthnContext);
877 IMPL_TYPED_CHILD(AuthnContextClassRef);
878 IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
879 IMPL_TYPED_CHILD(AuthnContextDeclRef);
880 IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
883 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
884 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
885 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
886 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
887 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
888 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
892 class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
893 public AbstractComplexElement,
894 public AbstractDOMCachingXMLObject,
895 public AbstractXMLObjectMarshaller,
896 public AbstractXMLObjectUnmarshaller
901 m_SessionNotOnOrAfter=NULL;
902 m_SubjectLocality=NULL;
904 m_children.push_back(NULL);
905 m_children.push_back(NULL);
906 m_pos_SubjectLocality=m_children.begin();
907 m_pos_AuthnContext=m_pos_SubjectLocality;
908 ++m_pos_AuthnContext;
911 virtual ~AuthnStatementImpl() {
912 delete m_AuthnInstant;
913 XMLString::release(&m_SessionIndex);
914 delete m_SessionNotOnOrAfter;
917 AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
918 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
922 AuthnStatementImpl(const AuthnStatementImpl& src)
923 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
925 setAuthnInstant(src.getAuthnInstant());
926 setSessionIndex(src.getSessionIndex());
927 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
928 if (src.getSubjectLocality())
929 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
930 if (src.getAuthnContext())
931 setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
934 IMPL_XMLOBJECT_CLONE(AuthnStatement);
935 Statement* cloneStatement() const {
936 return cloneAuthnStatement();
938 IMPL_DATETIME_ATTRIB(AuthnInstant,0);
939 IMPL_STRING_ATTRIB(SessionIndex);
940 IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
941 IMPL_TYPED_CHILD(SubjectLocality);
942 IMPL_TYPED_CHILD(AuthnContext);
945 void marshallAttributes(DOMElement* domElement) const {
946 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
947 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
948 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
951 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
952 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
953 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
954 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
957 void processAttribute(const DOMAttr* attribute) {
958 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
959 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
960 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
961 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
965 class SAML_DLLLOCAL ActionImpl : public virtual Action,
966 public AbstractSimpleElement,
967 public AbstractDOMCachingXMLObject,
968 public AbstractXMLObjectMarshaller,
969 public AbstractXMLObjectUnmarshaller
972 virtual ~ActionImpl() {
973 XMLString::release(&m_Namespace);
976 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
977 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
980 ActionImpl(const ActionImpl& src)
981 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
982 setNamespace(src.getNamespace());
985 IMPL_XMLOBJECT_CLONE(Action);
986 IMPL_STRING_ATTRIB(Namespace);
989 void marshallAttributes(DOMElement* domElement) const {
990 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
993 void processAttribute(const DOMAttr* attribute) {
994 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
995 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
999 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
1000 public AbstractComplexElement,
1001 public AbstractDOMCachingXMLObject,
1002 public AbstractXMLObjectMarshaller,
1003 public AbstractXMLObjectUnmarshaller
1006 virtual ~EvidenceImpl() {}
1008 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1009 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1012 EvidenceImpl(const EvidenceImpl& src)
1013 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1014 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1016 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1018 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1022 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1024 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1028 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1030 getAssertions().push_back(assertion->cloneAssertion());
1034 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1036 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1043 IMPL_XMLOBJECT_CLONE(Evidence);
1044 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1045 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1046 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1047 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1050 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1051 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1052 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1053 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1054 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1055 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1059 class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1060 public AbstractComplexElement,
1061 public AbstractDOMCachingXMLObject,
1062 public AbstractXMLObjectMarshaller,
1063 public AbstractXMLObjectUnmarshaller
1069 m_children.push_back(NULL);
1070 m_pos_Evidence=m_children.begin();
1073 virtual ~AuthzDecisionStatementImpl() {
1074 XMLString::release(&m_Resource);
1075 XMLString::release(&m_Decision);
1078 AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1079 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1083 AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1084 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1086 setResource(src.getResource());
1087 setDecision(src.getDecision());
1088 if (src.getEvidence())
1089 setEvidence(src.getEvidence()->cloneEvidence());
1090 VectorOf(Action) v=getActions();
1091 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1093 v.push_back((*i)->cloneAction());
1098 IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1099 Statement* cloneStatement() const {
1100 return cloneAuthzDecisionStatement();
1102 IMPL_STRING_ATTRIB(Resource);
1103 IMPL_STRING_ATTRIB(Decision);
1104 IMPL_TYPED_CHILD(Evidence);
1105 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1108 void marshallAttributes(DOMElement* domElement) const {
1109 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1110 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1113 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1114 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1115 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1116 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1119 void processAttribute(const DOMAttr* attribute) {
1120 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1121 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1122 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1126 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1129 virtual ~AttributeValueImpl() {}
1131 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1132 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1135 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1138 IMPL_XMLOBJECT_CLONE(AttributeValue);
1142 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1143 public AbstractComplexElement,
1144 public AbstractAttributeExtensibleXMLObject,
1145 public AbstractDOMCachingXMLObject,
1146 public AbstractXMLObjectMarshaller,
1147 public AbstractXMLObjectUnmarshaller
1150 m_Name=m_NameFormat=m_FriendlyName=NULL;
1153 virtual ~AttributeImpl() {
1154 XMLString::release(&m_Name);
1155 XMLString::release(&m_NameFormat);
1156 XMLString::release(&m_FriendlyName);
1159 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1160 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1164 AttributeImpl(const AttributeImpl& src)
1165 : AbstractXMLObject(src), AbstractComplexElement(src),
1166 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1168 setName(src.getName());
1169 setNameFormat(src.getNameFormat());
1170 setFriendlyName(src.getFriendlyName());
1171 VectorOf(XMLObject) v=getAttributeValues();
1172 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1174 v.push_back((*i)->clone());
1179 IMPL_XMLOBJECT_CLONE(Attribute);
1180 IMPL_STRING_ATTRIB(Name);
1181 IMPL_STRING_ATTRIB(NameFormat);
1182 IMPL_STRING_ATTRIB(FriendlyName);
1183 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1185 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1186 if (!qualifiedName.hasNamespaceURI()) {
1187 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1191 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1192 setNameFormat(value);
1195 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1196 setFriendlyName(value);
1200 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1204 void marshallAttributes(DOMElement* domElement) const {
1205 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1206 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1207 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1208 marshallExtensionAttributes(domElement);
1211 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1212 getAttributeValues().push_back(childXMLObject);
1215 void processAttribute(const DOMAttr* attribute) {
1216 unmarshallExtensionAttribute(attribute);
1220 //TODO unit test for this
1221 class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1224 virtual ~EncryptedAttributeImpl() {}
1226 EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1227 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1229 EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1231 IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1232 EncryptedElementType* cloneEncryptedElementType() const {
1233 return new EncryptedAttributeImpl(*this);
1237 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1238 public AbstractComplexElement,
1239 public AbstractDOMCachingXMLObject,
1240 public AbstractXMLObjectMarshaller,
1241 public AbstractXMLObjectUnmarshaller
1244 virtual ~AttributeStatementImpl() {}
1246 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1247 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1250 AttributeStatementImpl(const AttributeStatementImpl& src)
1251 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1252 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1254 Attribute* attribute=dynamic_cast<Attribute*>(*i);
1256 getAttributes().push_back(attribute->cloneAttribute());
1260 EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1262 getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1269 IMPL_XMLOBJECT_CLONE(AttributeStatement);
1270 Statement* cloneStatement() const {
1271 return cloneAttributeStatement();
1273 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1274 IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1277 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1278 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1279 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1280 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1284 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1285 public AbstractComplexElement,
1286 public AbstractDOMCachingXMLObject,
1287 public AbstractXMLObjectMarshaller,
1288 public AbstractXMLObjectUnmarshaller
1291 virtual ~AdviceImpl() {}
1293 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1294 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1297 AdviceImpl(const AdviceImpl& src)
1298 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1299 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1301 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1303 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1307 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1309 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1313 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1315 getAssertions().push_back(assertion->cloneAssertion());
1319 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1321 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1325 getUnknownXMLObjects().push_back((*i)->clone());
1330 IMPL_XMLOBJECT_CLONE(Advice);
1331 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1332 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1333 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1334 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1335 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1338 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1339 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1340 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1341 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1342 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1345 const XMLCh* nsURI=root->getNamespaceURI();
1346 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1347 getUnknownXMLObjects().push_back(childXMLObject);
1351 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1355 //TODO unit test for this
1356 class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1359 virtual ~EncryptedAssertionImpl() {}
1361 EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1362 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1364 EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1366 IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1367 EncryptedElementType* cloneEncryptedElementType() const {
1368 return new EncryptedAssertionImpl(*this);
1372 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1373 public AbstractComplexElement,
1374 public AbstractDOMCachingXMLObject,
1375 public AbstractXMLObjectMarshaller,
1376 public AbstractXMLObjectUnmarshaller
1381 m_IssueInstant=NULL;
1387 m_children.push_back(NULL);
1388 m_children.push_back(NULL);
1389 m_children.push_back(NULL);
1390 m_children.push_back(NULL);
1391 m_children.push_back(NULL);
1392 m_pos_Issuer=m_children.begin();
1393 m_pos_Signature=m_pos_Issuer;
1395 m_pos_Subject=m_pos_Signature;
1397 m_pos_Conditions=m_pos_Subject;
1399 m_pos_Advice=m_pos_Conditions;
1403 virtual ~AssertionImpl() {
1404 XMLString::release(&m_ID);
1405 XMLString::release(&m_Version);
1406 delete m_IssueInstant;
1409 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1410 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1414 AssertionImpl(const AssertionImpl& src)
1415 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1417 setVersion(src.getVersion());
1419 setIssueInstant(src.getIssueInstant());
1420 if (src.getIssuer())
1421 setIssuer(src.getIssuer()->cloneIssuer());
1422 if (src.getSignature())
1423 setSignature(src.getSignature()->cloneSignature());
1424 if (src.getSubject())
1425 setSubject(src.getSubject()->cloneSubject());
1426 if (src.getConditions())
1427 setConditions(src.getConditions()->cloneConditions());
1428 if (src.getAdvice())
1429 setAdvice(src.getAdvice()->cloneAdvice());
1430 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1432 AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1434 getAuthnStatements().push_back(authst->cloneAuthnStatement());
1438 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1440 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1444 AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1446 getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1450 Statement* st=dynamic_cast<Statement*>(*i);
1452 getStatements().push_back(st->cloneStatement());
1459 //IMPL_TYPED_CHILD(Signature);
1460 // Need customized setter.
1462 Signature* m_Signature;
1463 list<XMLObject*>::iterator m_pos_Signature;
1465 Signature* getSignature() const {
1469 void setSignature(Signature* sig) {
1470 prepareForAssignment(m_Signature,sig);
1471 *m_pos_Signature=m_Signature=sig;
1472 // Sync content reference back up.
1474 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1477 IMPL_XMLOBJECT_CLONE(Assertion);
1478 IMPL_STRING_ATTRIB(Version);
1480 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1481 IMPL_TYPED_CHILD(Issuer);
1482 IMPL_TYPED_CHILD(Subject);
1483 IMPL_TYPED_CHILD(Conditions);
1484 IMPL_TYPED_CHILD(Advice);
1485 IMPL_TYPED_CHILDREN(Statement, m_children.end());
1486 IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1487 IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1488 IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1491 void marshallAttributes(DOMElement* domElement) const {
1493 const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1494 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1496 const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1497 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1498 if (!m_IssueInstant) {
1499 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1500 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1502 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1505 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1506 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1507 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1508 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1509 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1510 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1511 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1512 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1513 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1514 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1515 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1518 void processAttribute(const DOMAttr* attribute) {
1519 PROC_STRING_ATTRIB(Version,VER,NULL);
1520 PROC_ID_ATTRIB(ID,ID,NULL);
1521 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1522 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1529 #if defined (_MSC_VER)
1530 #pragma warning( pop )
1533 // Builder Implementations
1535 IMPL_XMLOBJECTBUILDER(Action);
1536 IMPL_XMLOBJECTBUILDER(Advice);
1537 IMPL_XMLOBJECTBUILDER(Assertion);
1538 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1539 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1540 IMPL_XMLOBJECTBUILDER(Attribute);
1541 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1542 IMPL_XMLOBJECTBUILDER(AttributeValue);
1543 IMPL_XMLOBJECTBUILDER(Audience);
1544 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1545 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1546 IMPL_XMLOBJECTBUILDER(AuthnContext);
1547 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1548 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1549 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1550 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1551 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1552 IMPL_XMLOBJECTBUILDER(Condition);
1553 IMPL_XMLOBJECTBUILDER(Conditions);
1554 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1555 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1556 IMPL_XMLOBJECTBUILDER(EncryptedID);
1557 IMPL_XMLOBJECTBUILDER(Evidence);
1558 IMPL_XMLOBJECTBUILDER(Issuer);
1559 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1560 IMPL_XMLOBJECTBUILDER(NameID);
1561 IMPL_XMLOBJECTBUILDER(NameIDType);
1562 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1563 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1564 IMPL_XMLOBJECTBUILDER(Statement);
1565 IMPL_XMLOBJECTBUILDER(Subject);
1566 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1567 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1568 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1571 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1572 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1573 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1574 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1575 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1576 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1577 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1578 const XMLCh Assertion::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1579 const XMLCh Assertion::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1580 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1581 const XMLCh AssertionIDRef::LOCAL_NAME[] = UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1582 const XMLCh AssertionURIRef::LOCAL_NAME[] = UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1583 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1584 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1585 const XMLCh Attribute::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1586 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1587 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1588 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);
1589 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);
1590 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1591 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1592 const XMLCh AudienceRestriction::LOCAL_NAME[] = UNICODE_LITERAL_19(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n);
1593 const XMLCh AudienceRestriction::TYPE_NAME[] = UNICODE_LITERAL_23(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,T,y,p,e);
1594 const XMLCh AuthenticatingAuthority::LOCAL_NAME[] = UNICODE_LITERAL_23(A,u,t,h,e,n,t,i,c,a,t,i,n,g,A,u,t,h,o,r,i,t,y);
1595 const XMLCh AuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1596 const XMLCh AuthnContext::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1597 const XMLCh AuthnContextClassRef::LOCAL_NAME[] = UNICODE_LITERAL_20(A,u,t,h,n,C,o,n,t,e,x,t,C,l,a,s,s,R,e,f);
1598 const XMLCh AuthnContextDecl::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1599 const XMLCh AuthnContextDeclRef::LOCAL_NAME[] = UNICODE_LITERAL_19(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l,R,e,f);
1600 const XMLCh AuthnStatement::LOCAL_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1601 const XMLCh AuthnStatement::TYPE_NAME[] = UNICODE_LITERAL_18(A,u,t,h,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1602 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1603 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1604 const XMLCh AuthnStatement::SESSIONNOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_19(S,e,s,s,i,o,n,N,o,t,O,n,O,r,A,f,t,e,r);
1605 const XMLCh AuthzDecisionStatement::LOCAL_NAME[] = UNICODE_LITERAL_22(A,u,t,h,z,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
1606 const XMLCh AuthzDecisionStatement::TYPE_NAME[] = UNICODE_LITERAL_26(A,u,t,h,z,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1607 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1608 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1609 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1610 const XMLCh AuthzDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1611 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1612 const XMLCh BaseID::LOCAL_NAME[] = UNICODE_LITERAL_6(B,a,s,e,I,D);
1613 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1614 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1615 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1616 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1617 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1618 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1619 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1620 const XMLCh EncryptedAssertion::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,s,s,e,r,t,i,o,n);
1621 const XMLCh EncryptedAttribute::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,t,t,r,i,b,u,t,e);
1622 const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull};
1623 const XMLCh EncryptedElementType::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,e,d,E,l,e,m,e,n,t,T,y,p,e);
1624 const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,D);
1625 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1626 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1627 const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1628 const XMLCh KeyInfoConfirmationDataType::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);
1629 const XMLCh KeyInfoConfirmationDataType::TYPE_NAME[] = UNICODE_LITERAL_27(K,e,y,I,n,f,o,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a,T,y,p,e);
1630 const XMLCh NameID::LOCAL_NAME[] = UNICODE_LITERAL_6(N,a,m,e,I,D);
1631 const XMLCh NameIDType::LOCAL_NAME[] = {chNull};
1632 const XMLCh NameIDType::TYPE_NAME[] = UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1633 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1634 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1635 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1636 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1637 const XMLCh OneTimeUse::LOCAL_NAME[] = UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1638 const XMLCh OneTimeUse::TYPE_NAME[] = UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1639 const XMLCh ProxyRestriction::LOCAL_NAME[] = UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1640 const XMLCh ProxyRestriction::TYPE_NAME[] = UNICODE_LITERAL_20(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n,T,y,p,e);
1641 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1642 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1643 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1644 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1645 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);
1646 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);
1647 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1648 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);
1649 const XMLCh SubjectConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1650 const XMLCh SubjectConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1651 const XMLCh SubjectConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1652 const XMLCh SubjectConfirmationDataType::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1653 const XMLCh SubjectConfirmationDataType::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1654 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1655 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);
1656 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1657 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1659 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1660 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1661 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1662 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1663 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1664 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1665 chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chNull
1668 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1669 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1670 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1671 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1672 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1673 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1674 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
1677 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1678 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1679 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1680 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1681 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1682 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1683 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1684 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1687 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1688 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1689 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1690 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1691 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1692 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1693 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1694 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1695 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1696 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1699 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1700 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1701 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1702 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1703 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1704 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1705 chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1708 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1709 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1710 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1711 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1712 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1713 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1714 chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1717 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1718 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1719 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1720 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1721 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1722 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1723 chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1726 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1727 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1728 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1729 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1730 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1731 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1732 chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1735 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1736 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1737 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1738 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1739 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1742 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
1743 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1744 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1745 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1746 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1747 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1750 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
1751 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1752 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1753 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1754 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1755 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1758 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1759 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1760 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1761 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1762 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1763 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1766 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1767 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1768 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1769 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1770 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1771 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1772 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1775 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1776 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1777 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1778 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1779 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1780 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1783 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1784 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1785 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1786 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1787 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1788 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1791 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1792 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1793 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1794 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1795 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1796 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1797 chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chNull
1800 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1801 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1802 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1803 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1804 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1805 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1806 chLatin_u, chLatin_r, chLatin_i, chNull
1809 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1810 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1811 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1812 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1813 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1814 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1815 chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull