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::XMLSIG_NS;
44 using xmlconstants::XMLENC_NS;
45 using samlconstants::SAML20_NS;
47 #if defined (_MSC_VER)
48 #pragma warning( push )
49 #pragma warning( disable : 4250 4251 )
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDRef);
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionURIRef);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextClassRef);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextDeclRef);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthenticatingAuthority);
62 class SAML_DLLLOCAL NameIDTypeImpl : public virtual NameIDType,
63 public AbstractSimpleElement,
64 public AbstractDOMCachingXMLObject,
65 public AbstractXMLObjectMarshaller,
66 public AbstractXMLObjectUnmarshaller
69 m_Format=m_SPProvidedID=m_NameQualifier=m_SPNameQualifier=NULL;
78 virtual ~NameIDTypeImpl() {
79 XMLString::release(&m_NameQualifier);
80 XMLString::release(&m_SPNameQualifier);
81 XMLString::release(&m_Format);
82 XMLString::release(&m_SPProvidedID);
85 NameIDTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
86 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
90 NameIDTypeImpl(const NameIDTypeImpl& src)
91 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
93 setNameQualifier(src.getNameQualifier());
94 setSPNameQualifier(src.getSPNameQualifier());
95 setFormat(src.getFormat());
96 setSPProvidedID(src.getSPProvidedID());
99 IMPL_XMLOBJECT_CLONE(NameIDType);
100 IMPL_STRING_ATTRIB(NameQualifier);
101 IMPL_STRING_ATTRIB(SPNameQualifier);
102 IMPL_STRING_ATTRIB(Format);
103 IMPL_STRING_ATTRIB(SPProvidedID);
106 void marshallAttributes(DOMElement* domElement) const {
107 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
108 MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
109 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
110 MARSHALL_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
113 void processAttribute(const DOMAttr* attribute) {
114 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
115 PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
116 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
117 PROC_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
118 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
122 class SAML_DLLLOCAL NameIDImpl : public virtual NameID, public NameIDTypeImpl
125 virtual ~NameIDImpl() {}
127 NameIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
128 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
130 NameIDImpl(const NameIDImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
132 IMPL_XMLOBJECT_CLONE(NameID);
133 NameIDType* cloneNameIDType() const {
134 return new NameIDImpl(*this);
138 class SAML_DLLLOCAL IssuerImpl : public virtual Issuer, public NameIDTypeImpl
141 virtual ~IssuerImpl() {}
143 IssuerImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
144 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
146 IssuerImpl(const IssuerImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
148 IMPL_XMLOBJECT_CLONE(Issuer);
149 NameIDType* cloneNameIDType() const {
150 return new IssuerImpl(*this);
154 //TODO unit test for this
155 // - need to test encryption/decryption too, or already done in xmltooling ?
156 class SAML_DLLLOCAL EncryptedElementTypeImpl : public virtual EncryptedElementType,
157 public AbstractComplexElement,
158 public AbstractDOMCachingXMLObject,
159 public AbstractXMLObjectMarshaller,
160 public AbstractXMLObjectUnmarshaller
163 m_EncryptedData=NULL;
164 m_children.push_back(NULL);
165 m_pos_EncryptedData=m_children.begin();
169 EncryptedElementTypeImpl() {
174 virtual ~EncryptedElementTypeImpl() {}
176 EncryptedElementTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
177 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
181 EncryptedElementTypeImpl(const EncryptedElementTypeImpl& src)
182 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
184 if (src.getEncryptedData())
185 setEncryptedData(src.getEncryptedData()->cloneEncryptedData());
186 VectorOf(EncryptedKey) v=getEncryptedKeys();
187 for (vector<EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {
189 v.push_back((*i)->cloneEncryptedKey());
194 IMPL_XMLOBJECT_CLONE(EncryptedElementType);
195 IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
196 IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
199 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
200 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
201 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
202 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
206 class SAML_DLLLOCAL EncryptedIDImpl : public virtual EncryptedID, public EncryptedElementTypeImpl
209 virtual ~EncryptedIDImpl() {}
211 EncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
212 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
214 EncryptedIDImpl(const EncryptedIDImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
216 IMPL_XMLOBJECT_CLONE(EncryptedID);
217 EncryptedElementType* cloneEncryptedElementType() const {
218 return new EncryptedIDImpl(*this);
222 class SAML_DLLLOCAL AudienceRestrictionImpl : public virtual AudienceRestriction,
223 public AbstractComplexElement,
224 public AbstractDOMCachingXMLObject,
225 public AbstractXMLObjectMarshaller,
226 public AbstractXMLObjectUnmarshaller
229 virtual ~AudienceRestrictionImpl() {}
231 AudienceRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
232 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
235 AudienceRestrictionImpl(const AudienceRestrictionImpl& src)
236 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
237 VectorOf(Audience) v=getAudiences();
238 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
240 v.push_back((*i)->cloneAudience());
245 IMPL_XMLOBJECT_CLONE(AudienceRestriction);
246 Condition* cloneCondition() const {
247 return cloneAudienceRestriction();
249 IMPL_TYPED_CHILDREN(Audience,m_children.end());
252 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
253 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
254 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
258 class SAML_DLLLOCAL OneTimeUseImpl : public virtual OneTimeUse,
259 public AbstractSimpleElement,
260 public AbstractDOMCachingXMLObject,
261 public AbstractXMLObjectMarshaller,
262 public AbstractXMLObjectUnmarshaller
265 virtual ~OneTimeUseImpl() {}
267 OneTimeUseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
268 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
271 OneTimeUseImpl(const OneTimeUseImpl& src)
272 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
275 IMPL_XMLOBJECT_CLONE(OneTimeUse);
276 Condition* cloneCondition() const {
277 return cloneOneTimeUse();
281 class SAML_DLLLOCAL ProxyRestrictionImpl : public virtual ProxyRestriction,
282 public AbstractComplexElement,
283 public AbstractDOMCachingXMLObject,
284 public AbstractXMLObjectMarshaller,
285 public AbstractXMLObjectUnmarshaller
288 virtual ~ProxyRestrictionImpl() {
289 XMLString::release(&m_Count);
292 ProxyRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
293 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
297 ProxyRestrictionImpl(const ProxyRestrictionImpl& src)
298 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
299 setCount(src.m_Count);
300 VectorOf(Audience) v=getAudiences();
301 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
303 v.push_back((*i)->cloneAudience());
308 IMPL_XMLOBJECT_CLONE(ProxyRestriction);
309 Condition* cloneCondition() const {
310 return cloneProxyRestriction();
312 IMPL_TYPED_CHILDREN(Audience,m_children.end());
313 IMPL_INTEGER_ATTRIB(Count);
316 void marshallAttributes(DOMElement* domElement) const {
317 MARSHALL_INTEGER_ATTRIB(Count,COUNT,NULL);
320 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
321 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
322 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
325 void processAttribute(const DOMAttr* attribute) {
326 PROC_INTEGER_ATTRIB(Count,COUNT,NULL);
327 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
332 class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
333 public AbstractComplexElement,
334 public AbstractDOMCachingXMLObject,
335 public AbstractXMLObjectMarshaller,
336 public AbstractXMLObjectUnmarshaller
339 m_NotBefore=m_NotOnOrAfter=NULL;
342 virtual ~ConditionsImpl() {
344 delete m_NotOnOrAfter;
347 ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
348 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
352 ConditionsImpl(const ConditionsImpl& src)
353 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
355 setNotBefore(src.getNotBefore());
356 setNotOnOrAfter(src.getNotOnOrAfter());
358 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
360 AudienceRestriction* arc=dynamic_cast<AudienceRestriction*>(*i);
362 getAudienceRestrictions().push_back(arc->cloneAudienceRestriction());
366 OneTimeUse* dncc=dynamic_cast<OneTimeUse*>(*i);
368 getOneTimeUses().push_back(dncc->cloneOneTimeUse());
372 ProxyRestriction* prc=dynamic_cast<ProxyRestriction*>(*i);
374 getProxyRestrictions().push_back(prc->cloneProxyRestriction());
378 Condition* c=dynamic_cast<Condition*>(*i);
380 getConditions().push_back(c->cloneCondition());
387 IMPL_XMLOBJECT_CLONE(Conditions);
388 IMPL_DATETIME_ATTRIB(NotBefore,0);
389 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
390 IMPL_TYPED_CHILDREN(AudienceRestriction, m_children.end());
391 IMPL_TYPED_CHILDREN(OneTimeUse,m_children.end());
392 IMPL_TYPED_CHILDREN(ProxyRestriction, m_children.end());
393 IMPL_TYPED_CHILDREN(Condition,m_children.end());
396 void marshallAttributes(DOMElement* domElement) const {
397 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
398 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
401 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
402 PROC_TYPED_CHILDREN(AudienceRestriction,SAML20_NS,false);
403 PROC_TYPED_CHILDREN(OneTimeUse,SAML20_NS,false);
404 PROC_TYPED_CHILDREN(ProxyRestriction,SAML20_NS,false);
405 PROC_TYPED_CHILDREN(Condition,SAML20_NS,false);
406 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
409 void processAttribute(const DOMAttr* attribute) {
410 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
411 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
412 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
416 class SAML_DLLLOCAL SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType,
417 public AbstractDOMCachingXMLObject,
418 public AbstractXMLObjectMarshaller,
419 public AbstractXMLObjectUnmarshaller
422 m_NotBefore=m_NotOnOrAfter=NULL;
423 m_Recipient=m_InResponseTo=m_Address=NULL;
427 SubjectConfirmationDataTypeImpl() {
432 virtual ~SubjectConfirmationDataTypeImpl() {
434 delete m_NotOnOrAfter;
435 XMLString::release(&m_Recipient);
436 XMLString::release(&m_InResponseTo);
437 XMLString::release(&m_Address);
440 SubjectConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
441 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
445 SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractDOMCachingXMLObject(src) {
447 setNotBefore(src.getNotBefore());
448 setNotOnOrAfter(src.getNotOnOrAfter());
449 setRecipient(src.getRecipient());
450 setInResponseTo(src.getInResponseTo());
451 setAddress(src.getAddress());
454 IMPL_DATETIME_ATTRIB(NotBefore,0);
455 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
456 IMPL_STRING_ATTRIB(Recipient);
457 IMPL_STRING_ATTRIB(InResponseTo);
458 IMPL_STRING_ATTRIB(Address);
461 void marshallAttributes(DOMElement* domElement) const {
462 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
463 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
464 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
465 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
466 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
469 void processAttribute(const DOMAttr* attribute) {
470 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
471 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
472 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
473 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
474 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
475 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
479 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public SubjectConfirmationData,
480 public SubjectConfirmationDataTypeImpl, public AnyElementImpl
483 virtual ~SubjectConfirmationDataImpl() {}
485 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
486 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
489 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
490 : SubjectConfirmationDataTypeImpl(src), AnyElementImpl(src) {
493 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
494 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
495 return new SubjectConfirmationDataImpl(*this);
498 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
499 if (!qualifiedName.hasNamespaceURI()) {
500 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
504 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
505 setNotOnOrAfter(value);
508 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
512 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
513 setInResponseTo(value);
516 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
521 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
525 void marshallAttributes(DOMElement* domElement) const {
526 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
527 AnyElementImpl::marshallAttributes(domElement);
531 class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
532 public SubjectConfirmationDataTypeImpl,
533 public AbstractComplexElement,
534 public AbstractAttributeExtensibleXMLObject
537 virtual ~KeyInfoConfirmationDataTypeImpl() {}
539 KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
540 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
543 KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
544 : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src),
545 AbstractAttributeExtensibleXMLObject(src) {
546 VectorOf(KeyInfo) v=getKeyInfos();
547 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
548 v.push_back((*i)->cloneKeyInfo());
551 IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
552 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
553 return new KeyInfoConfirmationDataTypeImpl(*this);
556 IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
559 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
560 if (!qualifiedName.hasNamespaceURI()) {
561 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
565 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
566 setNotOnOrAfter(value);
569 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
573 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
574 setInResponseTo(value);
577 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
582 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
586 void marshallAttributes(DOMElement* domElement) const {
587 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
588 marshallExtensionAttributes(domElement);
591 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
592 PROC_TYPED_CHILDREN(KeyInfo,XMLSIG_NS,false);
593 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
596 void processAttribute(const DOMAttr* attribute) {
597 unmarshallExtensionAttribute(attribute);
601 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
602 public AbstractComplexElement,
603 public AbstractDOMCachingXMLObject,
604 public AbstractXMLObjectMarshaller,
605 public AbstractXMLObjectUnmarshaller
612 m_SubjectConfirmationData=NULL;
613 m_children.push_back(NULL);
614 m_children.push_back(NULL);
615 m_children.push_back(NULL);
616 m_children.push_back(NULL);
617 m_pos_BaseID=m_children.begin();
618 m_pos_NameID=m_pos_BaseID;
620 m_pos_EncryptedID=m_pos_NameID;
622 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
623 ++m_pos_SubjectConfirmationData;
626 virtual ~SubjectConfirmationImpl() {}
628 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
629 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
633 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
634 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
636 setMethod(src.getMethod());
638 setBaseID(src.getBaseID()->cloneBaseID());
640 setNameID(src.getNameID()->cloneNameID());
641 if (src.getEncryptedID())
642 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
643 if (src.getSubjectConfirmationData())
644 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
647 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
648 IMPL_STRING_ATTRIB(Method);
649 IMPL_TYPED_CHILD(BaseID);
650 IMPL_TYPED_CHILD(NameID);
651 IMPL_TYPED_CHILD(EncryptedID);
652 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
655 void marshallAttributes(DOMElement* domElement) const {
656 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
659 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
660 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
661 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
662 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
663 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
664 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
667 void processAttribute(const DOMAttr* attribute) {
668 PROC_STRING_ATTRIB(Method,METHOD,NULL);
669 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
673 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
674 public AbstractComplexElement,
675 public AbstractDOMCachingXMLObject,
676 public AbstractXMLObjectMarshaller,
677 public AbstractXMLObjectUnmarshaller
683 m_children.push_back(NULL);
684 m_children.push_back(NULL);
685 m_children.push_back(NULL);
686 m_pos_BaseID=m_children.begin();
687 m_pos_NameID=m_pos_BaseID;
689 m_pos_EncryptedID=m_pos_NameID;
693 virtual ~SubjectImpl() {}
695 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
696 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
700 SubjectImpl(const SubjectImpl& src)
701 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
704 setBaseID(src.getBaseID()->cloneBaseID());
706 setNameID(src.getNameID()->cloneNameID());
707 if (src.getEncryptedID())
708 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
709 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
710 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
712 v.push_back((*i)->cloneSubjectConfirmation());
717 IMPL_XMLOBJECT_CLONE(Subject);
718 IMPL_TYPED_CHILD(NameID);
719 IMPL_TYPED_CHILD(BaseID);
720 IMPL_TYPED_CHILD(EncryptedID);
721 IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
724 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
725 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
726 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
727 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
728 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
729 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
733 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
734 public AbstractSimpleElement,
735 public AbstractDOMCachingXMLObject,
736 public AbstractXMLObjectMarshaller,
737 public AbstractXMLObjectUnmarshaller
740 m_Address=m_DNSName=NULL;
743 virtual ~SubjectLocalityImpl() {
744 XMLString::release(&m_Address);
745 XMLString::release(&m_DNSName);
748 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
749 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
753 SubjectLocalityImpl(const SubjectLocalityImpl& src)
754 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
756 setAddress(src.getAddress());
757 setDNSName(src.getDNSName());
760 IMPL_XMLOBJECT_CLONE(SubjectLocality);
761 IMPL_STRING_ATTRIB(Address);
762 IMPL_STRING_ATTRIB(DNSName);
765 void marshallAttributes(DOMElement* domElement) const {
766 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
767 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
770 void processAttribute(const DOMAttr* attribute) {
771 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
772 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
773 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
777 //TODO need unit test for this
778 class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
781 virtual ~AuthnContextDeclImpl() {}
783 AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
784 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
787 AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
790 IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
793 class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
794 public AbstractComplexElement,
795 public AbstractDOMCachingXMLObject,
796 public AbstractXMLObjectMarshaller,
797 public AbstractXMLObjectUnmarshaller
800 m_AuthnContextClassRef=NULL;
801 m_AuthnContextDecl=NULL;
802 m_AuthnContextDeclRef=NULL;
803 m_children.push_back(NULL);
804 m_children.push_back(NULL);
805 m_children.push_back(NULL);
806 m_pos_AuthnContextClassRef=m_children.begin();
807 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
808 ++m_pos_AuthnContextDecl;
809 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
810 ++m_pos_AuthnContextDeclRef;
813 virtual ~AuthnContextImpl() {}
815 AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
816 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
820 AuthnContextImpl(const AuthnContextImpl& src)
821 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
823 if (src.getAuthnContextClassRef())
824 setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
825 if (src.getAuthnContextDecl())
826 setAuthnContextDecl(src.getAuthnContextDecl()->clone());
827 if (src.getAuthnContextDeclRef())
828 setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
829 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
830 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
832 v.push_back((*i)->cloneAuthenticatingAuthority());
837 IMPL_XMLOBJECT_CLONE(AuthnContext);
838 IMPL_TYPED_CHILD(AuthnContextClassRef);
839 IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
840 IMPL_TYPED_CHILD(AuthnContextDeclRef);
841 IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
844 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
845 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
846 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
847 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
848 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
849 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
853 class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
854 public AbstractComplexElement,
855 public AbstractDOMCachingXMLObject,
856 public AbstractXMLObjectMarshaller,
857 public AbstractXMLObjectUnmarshaller
862 m_SessionNotOnOrAfter=NULL;
863 m_SubjectLocality=NULL;
865 m_children.push_back(NULL);
866 m_children.push_back(NULL);
867 m_pos_SubjectLocality=m_children.begin();
868 m_pos_AuthnContext=m_pos_SubjectLocality;
869 ++m_pos_AuthnContext;
872 virtual ~AuthnStatementImpl() {
873 delete m_AuthnInstant;
874 XMLString::release(&m_SessionIndex);
875 delete m_SessionNotOnOrAfter;
878 AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
879 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
883 AuthnStatementImpl(const AuthnStatementImpl& src)
884 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
886 setAuthnInstant(src.getAuthnInstant());
887 setSessionIndex(src.getSessionIndex());
888 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
889 if (src.getSubjectLocality())
890 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
891 if (src.getAuthnContext())
892 setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
895 IMPL_XMLOBJECT_CLONE(AuthnStatement);
896 Statement* cloneStatement() const {
897 return cloneAuthnStatement();
899 IMPL_DATETIME_ATTRIB(AuthnInstant,0);
900 IMPL_STRING_ATTRIB(SessionIndex);
901 IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
902 IMPL_TYPED_CHILD(SubjectLocality);
903 IMPL_TYPED_CHILD(AuthnContext);
906 void marshallAttributes(DOMElement* domElement) const {
907 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
908 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
909 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
912 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
913 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
914 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
915 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
918 void processAttribute(const DOMAttr* attribute) {
919 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
920 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
921 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
922 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
926 class SAML_DLLLOCAL ActionImpl : public virtual Action,
927 public AbstractSimpleElement,
928 public AbstractDOMCachingXMLObject,
929 public AbstractXMLObjectMarshaller,
930 public AbstractXMLObjectUnmarshaller
933 virtual ~ActionImpl() {
934 XMLString::release(&m_Namespace);
937 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
938 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
941 ActionImpl(const ActionImpl& src)
942 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
943 setNamespace(src.getNamespace());
946 IMPL_XMLOBJECT_CLONE(Action);
947 IMPL_STRING_ATTRIB(Namespace);
950 void marshallAttributes(DOMElement* domElement) const {
951 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
954 void processAttribute(const DOMAttr* attribute) {
955 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
956 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
960 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
961 public AbstractComplexElement,
962 public AbstractDOMCachingXMLObject,
963 public AbstractXMLObjectMarshaller,
964 public AbstractXMLObjectUnmarshaller
967 virtual ~EvidenceImpl() {}
969 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
970 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
973 EvidenceImpl(const EvidenceImpl& src)
974 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
975 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
977 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
979 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
983 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
985 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
989 Assertion* assertion=dynamic_cast<Assertion*>(*i);
991 getAssertions().push_back(assertion->cloneAssertion());
995 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
997 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1004 IMPL_XMLOBJECT_CLONE(Evidence);
1005 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1006 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1007 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1008 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1011 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1012 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1013 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1014 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1015 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1016 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1020 class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1021 public AbstractComplexElement,
1022 public AbstractDOMCachingXMLObject,
1023 public AbstractXMLObjectMarshaller,
1024 public AbstractXMLObjectUnmarshaller
1030 m_children.push_back(NULL);
1031 m_pos_Evidence=m_children.begin();
1034 virtual ~AuthzDecisionStatementImpl() {
1035 XMLString::release(&m_Resource);
1036 XMLString::release(&m_Decision);
1039 AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1040 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1044 AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1045 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1047 setResource(src.getResource());
1048 setDecision(src.getDecision());
1049 if (src.getEvidence())
1050 setEvidence(src.getEvidence()->cloneEvidence());
1051 VectorOf(Action) v=getActions();
1052 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1054 v.push_back((*i)->cloneAction());
1059 IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1060 Statement* cloneStatement() const {
1061 return cloneAuthzDecisionStatement();
1063 IMPL_STRING_ATTRIB(Resource);
1064 IMPL_STRING_ATTRIB(Decision);
1065 IMPL_TYPED_CHILD(Evidence);
1066 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1069 void marshallAttributes(DOMElement* domElement) const {
1070 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1071 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1074 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1075 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1076 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1077 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1080 void processAttribute(const DOMAttr* attribute) {
1081 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1082 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1083 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1087 //TODO need unit test for this
1088 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1091 virtual ~AttributeValueImpl() {}
1093 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1094 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1097 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1100 IMPL_XMLOBJECT_CLONE(AttributeValue);
1104 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1105 public AbstractComplexElement,
1106 public AbstractAttributeExtensibleXMLObject,
1107 public AbstractDOMCachingXMLObject,
1108 public AbstractXMLObjectMarshaller,
1109 public AbstractXMLObjectUnmarshaller
1112 m_Name=m_NameFormat=m_FriendlyName=NULL;
1115 virtual ~AttributeImpl() {
1116 XMLString::release(&m_Name);
1117 XMLString::release(&m_NameFormat);
1118 XMLString::release(&m_FriendlyName);
1121 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1122 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1126 AttributeImpl(const AttributeImpl& src)
1127 : AbstractXMLObject(src), AbstractComplexElement(src),
1128 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1130 setName(src.getName());
1131 setNameFormat(src.getNameFormat());
1132 setFriendlyName(src.getFriendlyName());
1133 VectorOf(XMLObject) v=getAttributeValues();
1134 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1136 v.push_back((*i)->clone());
1141 IMPL_XMLOBJECT_CLONE(Attribute);
1142 IMPL_STRING_ATTRIB(Name);
1143 IMPL_STRING_ATTRIB(NameFormat);
1144 IMPL_STRING_ATTRIB(FriendlyName);
1145 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1147 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1148 if (!qualifiedName.hasNamespaceURI()) {
1149 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1153 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1154 setNameFormat(value);
1157 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1158 setFriendlyName(value);
1162 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1166 void marshallAttributes(DOMElement* domElement) const {
1167 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1168 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1169 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1170 marshallExtensionAttributes(domElement);
1173 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1174 getAttributeValues().push_back(childXMLObject);
1177 void processAttribute(const DOMAttr* attribute) {
1178 unmarshallExtensionAttribute(attribute);
1182 //TODO unit test for this
1183 class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1186 virtual ~EncryptedAttributeImpl() {}
1188 EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1189 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1191 EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1193 IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1194 EncryptedElementType* cloneEncryptedElementType() const {
1195 return new EncryptedAttributeImpl(*this);
1199 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1200 public AbstractComplexElement,
1201 public AbstractDOMCachingXMLObject,
1202 public AbstractXMLObjectMarshaller,
1203 public AbstractXMLObjectUnmarshaller
1206 virtual ~AttributeStatementImpl() {}
1208 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1209 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1212 AttributeStatementImpl(const AttributeStatementImpl& src)
1213 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1214 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1216 Attribute* attribute=dynamic_cast<Attribute*>(*i);
1218 getAttributes().push_back(attribute->cloneAttribute());
1222 EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1224 getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1231 IMPL_XMLOBJECT_CLONE(AttributeStatement);
1232 Statement* cloneStatement() const {
1233 return cloneAttributeStatement();
1235 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1236 IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1239 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1240 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1241 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1242 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1246 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1247 public AbstractComplexElement,
1248 public AbstractDOMCachingXMLObject,
1249 public AbstractXMLObjectMarshaller,
1250 public AbstractXMLObjectUnmarshaller
1253 virtual ~AdviceImpl() {}
1255 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1256 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1259 AdviceImpl(const AdviceImpl& src)
1260 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1261 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1263 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1265 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1269 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1271 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1275 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1277 getAssertions().push_back(assertion->cloneAssertion());
1281 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1283 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1287 getUnknownXMLObjects().push_back((*i)->clone());
1292 IMPL_XMLOBJECT_CLONE(Advice);
1293 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1294 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1295 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1296 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1297 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1300 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1301 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1302 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1303 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1304 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1307 const XMLCh* nsURI=root->getNamespaceURI();
1308 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1309 getUnknownXMLObjects().push_back(childXMLObject);
1313 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1317 //TODO unit test for this
1318 class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1321 virtual ~EncryptedAssertionImpl() {}
1323 EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1324 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1326 EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1328 IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1329 EncryptedElementType* cloneEncryptedElementType() const {
1330 return new EncryptedAssertionImpl(*this);
1334 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1335 public AbstractComplexElement,
1336 public AbstractDOMCachingXMLObject,
1337 public AbstractXMLObjectMarshaller,
1338 public AbstractXMLObjectUnmarshaller
1343 m_IssueInstant=NULL;
1349 m_children.push_back(NULL);
1350 m_children.push_back(NULL);
1351 m_children.push_back(NULL);
1352 m_children.push_back(NULL);
1353 m_children.push_back(NULL);
1354 m_pos_Issuer=m_children.begin();
1355 m_pos_Signature=m_pos_Issuer;
1357 m_pos_Subject=m_pos_Signature;
1359 m_pos_Conditions=m_pos_Subject;
1361 m_pos_Advice=m_pos_Conditions;
1365 virtual ~AssertionImpl() {
1366 XMLString::release(&m_ID);
1367 XMLString::release(&m_Version);
1368 delete m_IssueInstant;
1371 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1372 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1376 AssertionImpl(const AssertionImpl& src)
1377 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1379 setVersion(src.getVersion());
1381 setIssueInstant(src.getIssueInstant());
1382 if (src.getIssuer())
1383 setIssuer(src.getIssuer()->cloneIssuer());
1384 if (src.getSignature())
1385 setSignature(src.getSignature()->cloneSignature());
1386 if (src.getSubject())
1387 setSubject(src.getSubject()->cloneSubject());
1388 if (src.getConditions())
1389 setConditions(src.getConditions()->cloneConditions());
1390 if (src.getAdvice())
1391 setAdvice(src.getAdvice()->cloneAdvice());
1392 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1394 AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1396 getAuthnStatements().push_back(authst->cloneAuthnStatement());
1400 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1402 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1406 AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1408 getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1412 Statement* st=dynamic_cast<Statement*>(*i);
1414 getStatements().push_back(st->cloneStatement());
1421 //IMPL_TYPED_CHILD(Signature);
1422 // Need customized setter.
1424 Signature* m_Signature;
1425 list<XMLObject*>::iterator m_pos_Signature;
1427 Signature* getSignature() const {
1431 void setSignature(Signature* sig) {
1432 prepareForAssignment(m_Signature,sig);
1433 *m_pos_Signature=m_Signature=sig;
1434 // Sync content reference back up.
1436 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1439 IMPL_XMLOBJECT_CLONE(Assertion);
1440 IMPL_STRING_ATTRIB(Version);
1442 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1443 IMPL_TYPED_CHILD(Issuer);
1444 IMPL_TYPED_CHILD(Subject);
1445 IMPL_TYPED_CHILD(Conditions);
1446 IMPL_TYPED_CHILD(Advice);
1447 IMPL_TYPED_CHILDREN(Statement, m_children.end());
1448 IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1449 IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1450 IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1453 void marshallAttributes(DOMElement* domElement) const {
1455 const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1456 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1458 const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1459 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1460 if (!m_IssueInstant) {
1461 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1462 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1464 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1467 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1468 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1469 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1470 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1471 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1472 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1473 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1474 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1475 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1476 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1477 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1480 void processAttribute(const DOMAttr* attribute) {
1481 PROC_STRING_ATTRIB(Version,VER,NULL);
1482 PROC_ID_ATTRIB(ID,ID,NULL);
1483 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1484 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1491 #if defined (_MSC_VER)
1492 #pragma warning( pop )
1495 // Builder Implementations
1497 IMPL_XMLOBJECTBUILDER(Action);
1498 IMPL_XMLOBJECTBUILDER(Advice);
1499 IMPL_XMLOBJECTBUILDER(Assertion);
1500 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1501 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1502 IMPL_XMLOBJECTBUILDER(Attribute);
1503 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1504 IMPL_XMLOBJECTBUILDER(AttributeValue);
1505 IMPL_XMLOBJECTBUILDER(Audience);
1506 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1507 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1508 IMPL_XMLOBJECTBUILDER(AuthnContext);
1509 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1510 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1511 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1512 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1513 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1514 IMPL_XMLOBJECTBUILDER(Conditions);
1515 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1516 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1517 IMPL_XMLOBJECTBUILDER(EncryptedID);
1518 IMPL_XMLOBJECTBUILDER(Evidence);
1519 IMPL_XMLOBJECTBUILDER(Issuer);
1520 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1521 IMPL_XMLOBJECTBUILDER(NameID);
1522 IMPL_XMLOBJECTBUILDER(NameIDType);
1523 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1524 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1525 IMPL_XMLOBJECTBUILDER(Subject);
1526 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1527 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1528 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1531 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1532 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1533 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1534 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1535 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1536 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1537 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1538 const XMLCh Assertion::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1539 const XMLCh Assertion::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1540 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1541 const XMLCh AssertionIDRef::LOCAL_NAME[] = UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1542 const XMLCh AssertionURIRef::LOCAL_NAME[] = UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1543 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1544 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1545 const XMLCh Attribute::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1546 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1547 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1548 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);
1549 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);
1550 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1551 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1552 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);
1553 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);
1554 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);
1555 const XMLCh AuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1556 const XMLCh AuthnContext::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1557 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);
1558 const XMLCh AuthnContextDecl::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1559 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);
1560 const XMLCh AuthnStatement::LOCAL_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1561 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);
1562 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1563 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1564 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);
1565 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);
1566 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);
1567 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1568 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1569 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1570 const XMLCh AuthzDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1571 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1572 const XMLCh BaseID::LOCAL_NAME[] = UNICODE_LITERAL_6(B,a,s,e,I,D);
1573 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1574 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1575 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1576 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1577 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1578 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1579 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1580 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);
1581 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);
1582 const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull};
1583 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);
1584 const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,d);
1585 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1586 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1587 const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1588 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);
1589 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);
1590 const XMLCh NameID::LOCAL_NAME[] = UNICODE_LITERAL_6(N,a,m,e,I,D);
1591 const XMLCh NameIDType::LOCAL_NAME[] = {chNull};
1592 const XMLCh NameIDType::TYPE_NAME[] = UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1593 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1594 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1595 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1596 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1597 const XMLCh OneTimeUse::LOCAL_NAME[] = UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1598 const XMLCh OneTimeUse::TYPE_NAME[] = UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1599 const XMLCh ProxyRestriction::LOCAL_NAME[] = UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1600 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);
1601 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1602 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1603 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1604 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1605 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);
1606 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);
1607 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1608 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);
1609 const XMLCh SubjectConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1610 const XMLCh SubjectConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1611 const XMLCh SubjectConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1612 const XMLCh SubjectConfirmationDataType::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1613 const XMLCh SubjectConfirmationDataType::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1614 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1615 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);
1616 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1617 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1619 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1620 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1621 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1622 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1623 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1624 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1625 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
1628 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1629 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1630 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1631 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1632 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1633 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1634 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
1637 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1638 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1639 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1640 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1641 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1642 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1643 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1644 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1647 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1648 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1649 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1650 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1651 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1652 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1653 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1654 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1655 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1656 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1659 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
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_2, chPeriod, chDigit_0, 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_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1668 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
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_2, chPeriod, chDigit_0, 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_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1677 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
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_2, chPeriod, chDigit_0, 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_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1686 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1687 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1688 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1689 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1690 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1691 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1692 chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1695 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1696 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1697 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1698 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1699 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1702 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
1703 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1704 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1705 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1706 chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1707 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1710 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
1711 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1712 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1713 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1714 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1715 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1718 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1719 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1720 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1721 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1722 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1723 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1726 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
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_1, chPeriod, chDigit_0, chColon,
1730 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1731 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1732 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1735 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
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_1, chPeriod, chDigit_0, chColon,
1739 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1740 chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1743 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1744 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1745 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1746 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1747 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1748 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1751 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1752 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1753 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1754 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1755 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1756 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1757 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
1760 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1761 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1762 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1763 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1764 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1765 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1766 chLatin_u, chLatin_r, chLatin_i, chNull
1769 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1770 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1771 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1772 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1773 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1774 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1775 chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull