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, public virtual AbstractXMLObject
419 m_NotBefore=m_NotOnOrAfter=NULL;
420 m_Recipient=m_InResponseTo=m_Address=NULL;
424 SubjectConfirmationDataTypeImpl() {
429 virtual ~SubjectConfirmationDataTypeImpl() {
431 delete m_NotOnOrAfter;
432 XMLString::release(&m_Recipient);
433 XMLString::release(&m_InResponseTo);
434 XMLString::release(&m_Address);
437 SubjectConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
438 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
442 SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractXMLObject(src) {
444 setNotBefore(src.getNotBefore());
445 setNotOnOrAfter(src.getNotOnOrAfter());
446 setRecipient(src.getRecipient());
447 setInResponseTo(src.getInResponseTo());
448 setAddress(src.getAddress());
451 IMPL_DATETIME_ATTRIB(NotBefore,0);
452 IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
453 IMPL_STRING_ATTRIB(Recipient);
454 IMPL_STRING_ATTRIB(InResponseTo);
455 IMPL_STRING_ATTRIB(Address);
458 void marshallAttributes(DOMElement* domElement) const {
459 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
460 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
461 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
462 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
463 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
466 void processAttribute(const DOMAttr* attribute) {
467 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
468 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
469 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
470 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
471 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
475 class SAML_DLLLOCAL SubjectConfirmationDataImpl : public SubjectConfirmationData,
476 public SubjectConfirmationDataTypeImpl, public AnyElementImpl
479 virtual ~SubjectConfirmationDataImpl() {}
481 SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
482 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
485 SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
486 : SubjectConfirmationDataTypeImpl(src), AnyElementImpl(src) {
489 IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
490 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
491 return new SubjectConfirmationDataImpl(*this);
494 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
495 if (!qualifiedName.hasNamespaceURI()) {
496 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
500 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
501 setNotOnOrAfter(value);
504 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
508 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
509 setInResponseTo(value);
512 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
517 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
521 void marshallAttributes(DOMElement* domElement) const {
522 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
523 AnyElementImpl::marshallAttributes(domElement);
526 void processAttribute(const DOMAttr* attribute) {
527 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
528 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
529 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
530 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
531 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
532 AnyElementImpl::processAttribute(attribute);
536 class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
537 public SubjectConfirmationDataTypeImpl,
538 public AbstractComplexElement,
539 public AbstractAttributeExtensibleXMLObject,
540 public AbstractDOMCachingXMLObject,
541 public AbstractXMLObjectMarshaller,
542 public AbstractXMLObjectUnmarshaller
545 virtual ~KeyInfoConfirmationDataTypeImpl() {}
547 KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
548 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
551 KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
552 : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src),
553 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
554 VectorOf(KeyInfo) v=getKeyInfos();
555 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
556 v.push_back((*i)->cloneKeyInfo());
559 IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
560 SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
561 return new KeyInfoConfirmationDataTypeImpl(*this);
564 IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
567 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
568 if (!qualifiedName.hasNamespaceURI()) {
569 if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
573 else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
574 setNotOnOrAfter(value);
577 else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
581 else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
582 setInResponseTo(value);
585 else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
590 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
594 void marshallAttributes(DOMElement* domElement) const {
595 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
596 marshallExtensionAttributes(domElement);
599 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
600 PROC_TYPED_CHILDREN(KeyInfo,XMLSIG_NS,false);
601 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
604 void processAttribute(const DOMAttr* attribute) {
605 unmarshallExtensionAttribute(attribute);
609 class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
610 public AbstractComplexElement,
611 public AbstractDOMCachingXMLObject,
612 public AbstractXMLObjectMarshaller,
613 public AbstractXMLObjectUnmarshaller
620 m_SubjectConfirmationData=NULL;
621 m_children.push_back(NULL);
622 m_children.push_back(NULL);
623 m_children.push_back(NULL);
624 m_children.push_back(NULL);
625 m_pos_BaseID=m_children.begin();
626 m_pos_NameID=m_pos_BaseID;
628 m_pos_EncryptedID=m_pos_NameID;
630 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
631 ++m_pos_SubjectConfirmationData;
634 virtual ~SubjectConfirmationImpl() {}
636 SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
637 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
641 SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
642 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
644 setMethod(src.getMethod());
646 setBaseID(src.getBaseID()->cloneBaseID());
648 setNameID(src.getNameID()->cloneNameID());
649 if (src.getEncryptedID())
650 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
651 if (src.getSubjectConfirmationData())
652 setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
655 IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
656 IMPL_STRING_ATTRIB(Method);
657 IMPL_TYPED_CHILD(BaseID);
658 IMPL_TYPED_CHILD(NameID);
659 IMPL_TYPED_CHILD(EncryptedID);
660 IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
663 void marshallAttributes(DOMElement* domElement) const {
664 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
667 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
668 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
669 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
670 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
671 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
672 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
675 void processAttribute(const DOMAttr* attribute) {
676 PROC_STRING_ATTRIB(Method,METHOD,NULL);
677 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
681 class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
682 public AbstractComplexElement,
683 public AbstractDOMCachingXMLObject,
684 public AbstractXMLObjectMarshaller,
685 public AbstractXMLObjectUnmarshaller
691 m_children.push_back(NULL);
692 m_children.push_back(NULL);
693 m_children.push_back(NULL);
694 m_pos_BaseID=m_children.begin();
695 m_pos_NameID=m_pos_BaseID;
697 m_pos_EncryptedID=m_pos_NameID;
701 virtual ~SubjectImpl() {}
703 SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
704 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
708 SubjectImpl(const SubjectImpl& src)
709 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
712 setBaseID(src.getBaseID()->cloneBaseID());
714 setNameID(src.getNameID()->cloneNameID());
715 if (src.getEncryptedID())
716 setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
717 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
718 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
720 v.push_back((*i)->cloneSubjectConfirmation());
725 IMPL_XMLOBJECT_CLONE(Subject);
726 IMPL_TYPED_CHILD(NameID);
727 IMPL_TYPED_CHILD(BaseID);
728 IMPL_TYPED_CHILD(EncryptedID);
729 IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
732 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
733 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
734 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
735 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
736 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
737 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
741 class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
742 public AbstractSimpleElement,
743 public AbstractDOMCachingXMLObject,
744 public AbstractXMLObjectMarshaller,
745 public AbstractXMLObjectUnmarshaller
748 m_Address=m_DNSName=NULL;
751 virtual ~SubjectLocalityImpl() {
752 XMLString::release(&m_Address);
753 XMLString::release(&m_DNSName);
756 SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
757 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
761 SubjectLocalityImpl(const SubjectLocalityImpl& src)
762 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
764 setAddress(src.getAddress());
765 setDNSName(src.getDNSName());
768 IMPL_XMLOBJECT_CLONE(SubjectLocality);
769 IMPL_STRING_ATTRIB(Address);
770 IMPL_STRING_ATTRIB(DNSName);
773 void marshallAttributes(DOMElement* domElement) const {
774 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
775 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
778 void processAttribute(const DOMAttr* attribute) {
779 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
780 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
781 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
785 //TODO need unit test for this
786 class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
789 virtual ~AuthnContextDeclImpl() {}
791 AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
792 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
795 AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
798 IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
801 class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
802 public AbstractComplexElement,
803 public AbstractDOMCachingXMLObject,
804 public AbstractXMLObjectMarshaller,
805 public AbstractXMLObjectUnmarshaller
808 m_AuthnContextClassRef=NULL;
809 m_AuthnContextDecl=NULL;
810 m_AuthnContextDeclRef=NULL;
811 m_children.push_back(NULL);
812 m_children.push_back(NULL);
813 m_children.push_back(NULL);
814 m_pos_AuthnContextClassRef=m_children.begin();
815 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
816 ++m_pos_AuthnContextDecl;
817 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
818 ++m_pos_AuthnContextDeclRef;
821 virtual ~AuthnContextImpl() {}
823 AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
824 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
828 AuthnContextImpl(const AuthnContextImpl& src)
829 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
831 if (src.getAuthnContextClassRef())
832 setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
833 if (src.getAuthnContextDecl())
834 setAuthnContextDecl(src.getAuthnContextDecl()->clone());
835 if (src.getAuthnContextDeclRef())
836 setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
837 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
838 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
840 v.push_back((*i)->cloneAuthenticatingAuthority());
845 IMPL_XMLOBJECT_CLONE(AuthnContext);
846 IMPL_TYPED_CHILD(AuthnContextClassRef);
847 IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
848 IMPL_TYPED_CHILD(AuthnContextDeclRef);
849 IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
852 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
853 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
854 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
855 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
856 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
857 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
861 class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
862 public AbstractComplexElement,
863 public AbstractDOMCachingXMLObject,
864 public AbstractXMLObjectMarshaller,
865 public AbstractXMLObjectUnmarshaller
870 m_SessionNotOnOrAfter=NULL;
871 m_SubjectLocality=NULL;
873 m_children.push_back(NULL);
874 m_children.push_back(NULL);
875 m_pos_SubjectLocality=m_children.begin();
876 m_pos_AuthnContext=m_pos_SubjectLocality;
877 ++m_pos_AuthnContext;
880 virtual ~AuthnStatementImpl() {
881 delete m_AuthnInstant;
882 XMLString::release(&m_SessionIndex);
883 delete m_SessionNotOnOrAfter;
886 AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
887 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
891 AuthnStatementImpl(const AuthnStatementImpl& src)
892 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
894 setAuthnInstant(src.getAuthnInstant());
895 setSessionIndex(src.getSessionIndex());
896 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
897 if (src.getSubjectLocality())
898 setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
899 if (src.getAuthnContext())
900 setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
903 IMPL_XMLOBJECT_CLONE(AuthnStatement);
904 Statement* cloneStatement() const {
905 return cloneAuthnStatement();
907 IMPL_DATETIME_ATTRIB(AuthnInstant,0);
908 IMPL_STRING_ATTRIB(SessionIndex);
909 IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
910 IMPL_TYPED_CHILD(SubjectLocality);
911 IMPL_TYPED_CHILD(AuthnContext);
914 void marshallAttributes(DOMElement* domElement) const {
915 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
916 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
917 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
920 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
921 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
922 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
923 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
926 void processAttribute(const DOMAttr* attribute) {
927 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
928 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
929 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
930 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
934 class SAML_DLLLOCAL ActionImpl : public virtual Action,
935 public AbstractSimpleElement,
936 public AbstractDOMCachingXMLObject,
937 public AbstractXMLObjectMarshaller,
938 public AbstractXMLObjectUnmarshaller
941 virtual ~ActionImpl() {
942 XMLString::release(&m_Namespace);
945 ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
946 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
949 ActionImpl(const ActionImpl& src)
950 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
951 setNamespace(src.getNamespace());
954 IMPL_XMLOBJECT_CLONE(Action);
955 IMPL_STRING_ATTRIB(Namespace);
958 void marshallAttributes(DOMElement* domElement) const {
959 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
962 void processAttribute(const DOMAttr* attribute) {
963 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
964 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
968 class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
969 public AbstractComplexElement,
970 public AbstractDOMCachingXMLObject,
971 public AbstractXMLObjectMarshaller,
972 public AbstractXMLObjectUnmarshaller
975 virtual ~EvidenceImpl() {}
977 EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
978 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
981 EvidenceImpl(const EvidenceImpl& src)
982 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
983 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
985 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
987 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
991 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
993 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
997 Assertion* assertion=dynamic_cast<Assertion*>(*i);
999 getAssertions().push_back(assertion->cloneAssertion());
1003 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1005 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1012 IMPL_XMLOBJECT_CLONE(Evidence);
1013 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1014 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1015 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1016 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1019 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1020 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1021 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1022 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1023 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1024 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1028 class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1029 public AbstractComplexElement,
1030 public AbstractDOMCachingXMLObject,
1031 public AbstractXMLObjectMarshaller,
1032 public AbstractXMLObjectUnmarshaller
1038 m_children.push_back(NULL);
1039 m_pos_Evidence=m_children.begin();
1042 virtual ~AuthzDecisionStatementImpl() {
1043 XMLString::release(&m_Resource);
1044 XMLString::release(&m_Decision);
1047 AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1048 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1052 AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1053 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1055 setResource(src.getResource());
1056 setDecision(src.getDecision());
1057 if (src.getEvidence())
1058 setEvidence(src.getEvidence()->cloneEvidence());
1059 VectorOf(Action) v=getActions();
1060 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1062 v.push_back((*i)->cloneAction());
1067 IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1068 Statement* cloneStatement() const {
1069 return cloneAuthzDecisionStatement();
1071 IMPL_STRING_ATTRIB(Resource);
1072 IMPL_STRING_ATTRIB(Decision);
1073 IMPL_TYPED_CHILD(Evidence);
1074 IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1077 void marshallAttributes(DOMElement* domElement) const {
1078 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1079 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1082 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1083 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1084 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1085 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1088 void processAttribute(const DOMAttr* attribute) {
1089 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1090 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1091 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1095 //TODO need unit test for this
1096 class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1099 virtual ~AttributeValueImpl() {}
1101 AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1102 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1105 AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1108 IMPL_XMLOBJECT_CLONE(AttributeValue);
1112 class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1113 public AbstractComplexElement,
1114 public AbstractAttributeExtensibleXMLObject,
1115 public AbstractDOMCachingXMLObject,
1116 public AbstractXMLObjectMarshaller,
1117 public AbstractXMLObjectUnmarshaller
1120 m_Name=m_NameFormat=m_FriendlyName=NULL;
1123 virtual ~AttributeImpl() {
1124 XMLString::release(&m_Name);
1125 XMLString::release(&m_NameFormat);
1126 XMLString::release(&m_FriendlyName);
1129 AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1130 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1134 AttributeImpl(const AttributeImpl& src)
1135 : AbstractXMLObject(src), AbstractComplexElement(src),
1136 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1138 setName(src.getName());
1139 setNameFormat(src.getNameFormat());
1140 setFriendlyName(src.getFriendlyName());
1141 VectorOf(XMLObject) v=getAttributeValues();
1142 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1144 v.push_back((*i)->clone());
1149 IMPL_XMLOBJECT_CLONE(Attribute);
1150 IMPL_STRING_ATTRIB(Name);
1151 IMPL_STRING_ATTRIB(NameFormat);
1152 IMPL_STRING_ATTRIB(FriendlyName);
1153 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1155 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1156 if (!qualifiedName.hasNamespaceURI()) {
1157 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1161 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1162 setNameFormat(value);
1165 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1166 setFriendlyName(value);
1170 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1174 void marshallAttributes(DOMElement* domElement) const {
1175 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1176 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1177 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1178 marshallExtensionAttributes(domElement);
1181 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1182 getAttributeValues().push_back(childXMLObject);
1185 void processAttribute(const DOMAttr* attribute) {
1186 unmarshallExtensionAttribute(attribute);
1190 //TODO unit test for this
1191 class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1194 virtual ~EncryptedAttributeImpl() {}
1196 EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1197 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1199 EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1201 IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1202 EncryptedElementType* cloneEncryptedElementType() const {
1203 return new EncryptedAttributeImpl(*this);
1207 class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1208 public AbstractComplexElement,
1209 public AbstractDOMCachingXMLObject,
1210 public AbstractXMLObjectMarshaller,
1211 public AbstractXMLObjectUnmarshaller
1214 virtual ~AttributeStatementImpl() {}
1216 AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1217 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1220 AttributeStatementImpl(const AttributeStatementImpl& src)
1221 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1222 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1224 Attribute* attribute=dynamic_cast<Attribute*>(*i);
1226 getAttributes().push_back(attribute->cloneAttribute());
1230 EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1232 getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1239 IMPL_XMLOBJECT_CLONE(AttributeStatement);
1240 Statement* cloneStatement() const {
1241 return cloneAttributeStatement();
1243 IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1244 IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1247 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1248 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1249 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1250 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1254 class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1255 public AbstractComplexElement,
1256 public AbstractDOMCachingXMLObject,
1257 public AbstractXMLObjectMarshaller,
1258 public AbstractXMLObjectUnmarshaller
1261 virtual ~AdviceImpl() {}
1263 AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1264 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1267 AdviceImpl(const AdviceImpl& src)
1268 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1269 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1271 AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1273 getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1277 AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1279 getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1283 Assertion* assertion=dynamic_cast<Assertion*>(*i);
1285 getAssertions().push_back(assertion->cloneAssertion());
1289 EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1291 getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1295 getUnknownXMLObjects().push_back((*i)->clone());
1300 IMPL_XMLOBJECT_CLONE(Advice);
1301 IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1302 IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1303 IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1304 IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1305 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1308 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1309 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1310 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1311 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1312 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1315 const XMLCh* nsURI=root->getNamespaceURI();
1316 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1317 getUnknownXMLObjects().push_back(childXMLObject);
1321 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1325 //TODO unit test for this
1326 class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1329 virtual ~EncryptedAssertionImpl() {}
1331 EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1332 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1334 EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1336 IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1337 EncryptedElementType* cloneEncryptedElementType() const {
1338 return new EncryptedAssertionImpl(*this);
1342 class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1343 public AbstractComplexElement,
1344 public AbstractDOMCachingXMLObject,
1345 public AbstractXMLObjectMarshaller,
1346 public AbstractXMLObjectUnmarshaller
1351 m_IssueInstant=NULL;
1357 m_children.push_back(NULL);
1358 m_children.push_back(NULL);
1359 m_children.push_back(NULL);
1360 m_children.push_back(NULL);
1361 m_children.push_back(NULL);
1362 m_pos_Issuer=m_children.begin();
1363 m_pos_Signature=m_pos_Issuer;
1365 m_pos_Subject=m_pos_Signature;
1367 m_pos_Conditions=m_pos_Subject;
1369 m_pos_Advice=m_pos_Conditions;
1373 virtual ~AssertionImpl() {
1374 XMLString::release(&m_ID);
1375 XMLString::release(&m_Version);
1376 delete m_IssueInstant;
1379 AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1380 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1384 AssertionImpl(const AssertionImpl& src)
1385 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1387 setVersion(src.getVersion());
1389 setIssueInstant(src.getIssueInstant());
1390 if (src.getIssuer())
1391 setIssuer(src.getIssuer()->cloneIssuer());
1392 if (src.getSignature())
1393 setSignature(src.getSignature()->cloneSignature());
1394 if (src.getSubject())
1395 setSubject(src.getSubject()->cloneSubject());
1396 if (src.getConditions())
1397 setConditions(src.getConditions()->cloneConditions());
1398 if (src.getAdvice())
1399 setAdvice(src.getAdvice()->cloneAdvice());
1400 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1402 AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1404 getAuthnStatements().push_back(authst->cloneAuthnStatement());
1408 AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1410 getAttributeStatements().push_back(attst->cloneAttributeStatement());
1414 AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1416 getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1420 Statement* st=dynamic_cast<Statement*>(*i);
1422 getStatements().push_back(st->cloneStatement());
1429 //IMPL_TYPED_CHILD(Signature);
1430 // Need customized setter.
1432 Signature* m_Signature;
1433 list<XMLObject*>::iterator m_pos_Signature;
1435 Signature* getSignature() const {
1439 void setSignature(Signature* sig) {
1440 prepareForAssignment(m_Signature,sig);
1441 *m_pos_Signature=m_Signature=sig;
1442 // Sync content reference back up.
1444 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1447 IMPL_XMLOBJECT_CLONE(Assertion);
1448 IMPL_STRING_ATTRIB(Version);
1450 IMPL_DATETIME_ATTRIB(IssueInstant,0);
1451 IMPL_TYPED_CHILD(Issuer);
1452 IMPL_TYPED_CHILD(Subject);
1453 IMPL_TYPED_CHILD(Conditions);
1454 IMPL_TYPED_CHILD(Advice);
1455 IMPL_TYPED_CHILDREN(Statement, m_children.end());
1456 IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1457 IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1458 IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1461 void marshallAttributes(DOMElement* domElement) const {
1463 const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1464 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1466 const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1467 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1468 if (!m_IssueInstant) {
1469 const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1470 const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1472 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1475 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1476 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1477 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1478 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1479 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1480 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1481 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1482 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1483 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1484 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1485 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1488 void processAttribute(const DOMAttr* attribute) {
1489 PROC_STRING_ATTRIB(Version,VER,NULL);
1490 PROC_ID_ATTRIB(ID,ID,NULL);
1491 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1492 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1499 #if defined (_MSC_VER)
1500 #pragma warning( pop )
1503 // Builder Implementations
1505 IMPL_XMLOBJECTBUILDER(Action);
1506 IMPL_XMLOBJECTBUILDER(Advice);
1507 IMPL_XMLOBJECTBUILDER(Assertion);
1508 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1509 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1510 IMPL_XMLOBJECTBUILDER(Attribute);
1511 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1512 IMPL_XMLOBJECTBUILDER(AttributeValue);
1513 IMPL_XMLOBJECTBUILDER(Audience);
1514 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1515 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1516 IMPL_XMLOBJECTBUILDER(AuthnContext);
1517 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1518 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1519 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1520 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1521 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1522 IMPL_XMLOBJECTBUILDER(Conditions);
1523 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1524 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1525 IMPL_XMLOBJECTBUILDER(EncryptedID);
1526 IMPL_XMLOBJECTBUILDER(Evidence);
1527 IMPL_XMLOBJECTBUILDER(Issuer);
1528 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1529 IMPL_XMLOBJECTBUILDER(NameID);
1530 IMPL_XMLOBJECTBUILDER(NameIDType);
1531 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1532 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1533 IMPL_XMLOBJECTBUILDER(Subject);
1534 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1535 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1536 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1539 const XMLCh Action::LOCAL_NAME[] = UNICODE_LITERAL_6(A,c,t,i,o,n);
1540 const XMLCh Action::TYPE_NAME[] = UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1541 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1542 const XMLCh Advice::LOCAL_NAME[] = UNICODE_LITERAL_6(A,d,v,i,c,e);
1543 const XMLCh Advice::TYPE_NAME[] = UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1544 const XMLCh Assertion::LOCAL_NAME[] = UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1545 const XMLCh Assertion::TYPE_NAME[] = UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1546 const XMLCh Assertion::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1547 const XMLCh Assertion::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1548 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1549 const XMLCh AssertionIDRef::LOCAL_NAME[] = UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1550 const XMLCh AssertionURIRef::LOCAL_NAME[] = UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1551 const XMLCh Attribute::LOCAL_NAME[] = UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1552 const XMLCh Attribute::TYPE_NAME[] = UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1553 const XMLCh Attribute::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1554 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1555 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1556 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);
1557 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);
1558 const XMLCh AttributeValue::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1559 const XMLCh Audience::LOCAL_NAME[] = UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1560 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);
1561 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);
1562 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);
1563 const XMLCh AuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1564 const XMLCh AuthnContext::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1565 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);
1566 const XMLCh AuthnContextDecl::LOCAL_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1567 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);
1568 const XMLCh AuthnStatement::LOCAL_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1569 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);
1570 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1571 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1572 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);
1573 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);
1574 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);
1575 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1576 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] = UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1577 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1578 const XMLCh AuthzDecisionStatement::DECISION_DENY[] = UNICODE_LITERAL_4(D,e,n,y);
1579 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] = UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1580 const XMLCh BaseID::LOCAL_NAME[] = UNICODE_LITERAL_6(B,a,s,e,I,D);
1581 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1582 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1583 const XMLCh Condition::LOCAL_NAME[] = UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1584 const XMLCh Conditions::LOCAL_NAME[] = UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1585 const XMLCh Conditions::TYPE_NAME[] = UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1586 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1587 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1588 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);
1589 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);
1590 const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull};
1591 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);
1592 const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,D);
1593 const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1594 const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1595 const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r);
1596 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);
1597 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);
1598 const XMLCh NameID::LOCAL_NAME[] = UNICODE_LITERAL_6(N,a,m,e,I,D);
1599 const XMLCh NameIDType::LOCAL_NAME[] = {chNull};
1600 const XMLCh NameIDType::TYPE_NAME[] = UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1601 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1602 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1603 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1604 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1605 const XMLCh OneTimeUse::LOCAL_NAME[] = UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1606 const XMLCh OneTimeUse::TYPE_NAME[] = UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1607 const XMLCh ProxyRestriction::LOCAL_NAME[] = UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1608 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);
1609 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1610 const XMLCh Statement::LOCAL_NAME[] = UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1611 const XMLCh Subject::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1612 const XMLCh Subject::TYPE_NAME[] = UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1613 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);
1614 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);
1615 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1616 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);
1617 const XMLCh SubjectConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] = UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1618 const XMLCh SubjectConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1619 const XMLCh SubjectConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1620 const XMLCh SubjectConfirmationDataType::RECIPIENT_ATTRIB_NAME[] = UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1621 const XMLCh SubjectConfirmationDataType::ADDRESS_ATTRIB_NAME[] = UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1622 const XMLCh SubjectLocality::LOCAL_NAME[] = UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1623 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);
1624 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1625 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1627 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1628 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1629 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1630 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1631 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1632 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1633 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
1636 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1637 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1638 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1639 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1640 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1641 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1642 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
1645 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1646 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1647 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1648 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1649 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1650 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1651 chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1652 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1655 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1656 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1657 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1658 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1659 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1660 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1661 chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1662 chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1663 chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1664 chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1667 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1668 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1669 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1670 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1671 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1672 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1673 chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1676 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1677 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1678 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1679 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1680 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1681 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1682 chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1685 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1686 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1687 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1688 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1689 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1690 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1691 chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1694 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1695 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1696 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1697 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1698 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1699 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1700 chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1703 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1704 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1705 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1706 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1707 chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1710 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
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_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1715 chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1718 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
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_2, chPeriod, chDigit_0, chColon,
1722 chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1723 chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1726 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
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, chNull
1734 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1735 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1736 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1737 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1738 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1739 chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1740 chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1743 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
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_g, chLatin_h, chLatin_p, chLatin_p, chNull
1751 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
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_1, chPeriod, chDigit_0, chColon,
1755 chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1756 chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1759 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1760 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1761 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1762 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1763 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1764 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1765 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
1768 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1769 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1770 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1771 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1772 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1773 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1774 chLatin_u, chLatin_r, chLatin_i, chNull
1777 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1778 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1779 chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1780 chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1781 chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1782 chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1783 chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull