2 * Licensed to the University Corporation for Advanced Internet
3 * Development, Inc. (UCAID) under one or more contributor license
4 * agreements. See the NOTICE file distributed with this work for
5 * additional information regarding copyright ownership.
7 * UCAID licenses this file to you under the Apache License,
8 * Version 2.0 (the "License"); you may not use this file except
9 * in compliance with the License. You may obtain a copy of the
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17 * either express or implied. See the License for the specific
18 * language governing permissions and limitations under the License.
24 * Implementation classes for SAML 2.0 Metadata schema.
28 #include "exceptions.h"
29 #include "saml2/metadata/Metadata.h"
30 #include "signature/ContentReference.h"
32 #include <xmltooling/AbstractComplexElement.h>
33 #include <xmltooling/AbstractSimpleElement.h>
34 #include <xmltooling/XMLToolingConfig.h>
35 #include <xmltooling/encryption/Encryption.h>
36 #include <xmltooling/impl/AnyElement.h>
37 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
38 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
39 #include <xmltooling/security/CredentialCriteria.h>
40 #include <xmltooling/security/CredentialResolver.h>
41 #include <xmltooling/signature/KeyInfo.h>
42 #include <xmltooling/signature/Signature.h>
43 #include <xmltooling/util/DateTime.h>
44 #include <xmltooling/util/XMLHelper.h>
47 #include <xercesc/util/XMLUniDefs.hpp>
48 #include <xsec/framework/XSECDefs.hpp>
50 using namespace samlconstants;
51 using namespace opensaml::saml2md;
52 using namespace opensaml::saml2;
53 using namespace xmlencryption;
54 using namespace xmlsignature;
55 using namespace xmltooling;
57 using xmlconstants::XMLSIG_NS;
58 using xmlconstants::XML_BOOL_NULL;
60 #if defined (_MSC_VER)
61 #pragma warning( push )
62 #pragma warning( disable : 4250 4251 )
68 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
69 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
70 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
71 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
72 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
73 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
74 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
75 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
77 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
78 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
79 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,IPHint);
80 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,DomainHint);
81 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GeolocationHint);
83 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
84 public AbstractSimpleElement,
85 public AbstractDOMCachingXMLObject,
86 public AbstractXMLObjectMarshaller,
87 public AbstractXMLObjectUnmarshaller
95 localizedNameTypeImpl() {
100 virtual ~localizedNameTypeImpl() {
101 XMLString::release(&m_Lang);
102 XMLString::release(&m_LangPrefix);
105 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
106 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
110 localizedNameTypeImpl(const localizedNameTypeImpl& src)
111 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
113 setLang(src.getLang());
114 if (src.m_LangPrefix)
115 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
118 IMPL_XMLOBJECT_CLONE(localizedNameType);
119 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
122 void marshallAttributes(DOMElement* domElement) const {
123 if (m_Lang && *m_Lang) {
124 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
125 if (m_LangPrefix && *m_LangPrefix)
126 attr->setPrefix(m_LangPrefix);
128 attr->setPrefix(xmlconstants::XML_PREFIX);
129 attr->setNodeValue(m_Lang);
130 domElement->setAttributeNodeNS(attr);
134 void processAttribute(const DOMAttr* attribute) {
135 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
136 setLang(attribute->getValue());
137 const XMLCh* temp = attribute->getPrefix();
138 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
139 m_LangPrefix = XMLString::replicate(temp);
142 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
146 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
147 public AbstractSimpleElement,
148 public AbstractDOMCachingXMLObject,
149 public AbstractXMLObjectMarshaller,
150 public AbstractXMLObjectUnmarshaller
154 m_LangPrefix=nullptr;
158 localizedURITypeImpl() {
163 virtual ~localizedURITypeImpl() {
164 XMLString::release(&m_Lang);
165 XMLString::release(&m_LangPrefix);
168 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
169 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
173 localizedURITypeImpl(const localizedURITypeImpl& src)
174 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
176 setLang(src.getLang());
177 if (src.m_LangPrefix)
178 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
181 IMPL_XMLOBJECT_CLONE(localizedURIType);
182 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
185 void marshallAttributes(DOMElement* domElement) const {
186 if (m_Lang && *m_Lang) {
187 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
188 if (m_LangPrefix && *m_LangPrefix)
189 attr->setPrefix(m_LangPrefix);
191 attr->setPrefix(xmlconstants::XML_PREFIX);
192 attr->setNodeValue(m_Lang);
193 domElement->setAttributeNodeNS(attr);
197 void processAttribute(const DOMAttr* attribute) {
198 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
199 setLang(attribute->getValue());
200 const XMLCh* temp = attribute->getPrefix();
201 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
202 m_LangPrefix = XMLString::replicate(temp);
205 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
209 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
212 virtual ~OrganizationNameImpl() {}
214 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
215 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
217 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
219 IMPL_XMLOBJECT_CLONE(OrganizationName);
220 localizedNameType* clonelocalizedNameType() const {
221 return new OrganizationNameImpl(*this);
225 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
228 virtual ~OrganizationDisplayNameImpl() {}
230 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
231 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
233 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
235 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
236 localizedNameType* clonelocalizedNameType() const {
237 return new OrganizationDisplayNameImpl(*this);
241 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
244 virtual ~OrganizationURLImpl() {}
246 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
247 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
249 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
251 IMPL_XMLOBJECT_CLONE(OrganizationURL);
252 localizedURIType* clonelocalizedURIType() const {
253 return new OrganizationURLImpl(*this);
257 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
260 virtual ~ServiceNameImpl() {}
262 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
263 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
265 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
267 IMPL_XMLOBJECT_CLONE(ServiceName);
268 localizedNameType* clonelocalizedNameType() const {
269 return new ServiceNameImpl(*this);
273 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
276 virtual ~ServiceDescriptionImpl() {}
278 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
279 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
281 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
283 IMPL_XMLOBJECT_CLONE(ServiceDescription);
284 localizedNameType* clonelocalizedNameType() const {
285 return new ServiceDescriptionImpl(*this);
289 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
290 public AbstractComplexElement,
291 public AbstractDOMCachingXMLObject,
292 public AbstractXMLObjectMarshaller,
293 public AbstractXMLObjectUnmarshaller
296 virtual ~ExtensionsImpl() {}
298 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
299 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
302 ExtensionsImpl(const ExtensionsImpl& src)
303 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
304 VectorOf(XMLObject) v=getUnknownXMLObjects();
305 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
306 v.push_back((*i)->clone());
309 IMPL_XMLOBJECT_CLONE(Extensions);
310 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
313 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
315 const XMLCh* nsURI=root->getNamespaceURI();
316 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
317 getUnknownXMLObjects().push_back(childXMLObject);
321 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
325 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
326 public AbstractComplexElement,
327 public AbstractAttributeExtensibleXMLObject,
328 public AbstractDOMCachingXMLObject,
329 public AbstractXMLObjectMarshaller,
330 public AbstractXMLObjectUnmarshaller
332 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
333 list<XMLObject*>::iterator m_pos_OrganizationURL;
336 m_children.push_back(nullptr);
337 m_children.push_back(nullptr);
338 m_children.push_back(nullptr);
339 m_Extensions=nullptr;
340 m_pos_Extensions=m_children.begin();
341 m_pos_OrganizationDisplayName=m_pos_Extensions;
342 ++m_pos_OrganizationDisplayName;
343 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
344 ++m_pos_OrganizationURL;
347 virtual ~OrganizationImpl() {}
349 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
350 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
354 OrganizationImpl(const OrganizationImpl& src)
355 : AbstractXMLObject(src), AbstractComplexElement(src),
356 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
358 if (src.getExtensions())
359 setExtensions(src.getExtensions()->cloneExtensions());
360 VectorOf(OrganizationName) v=getOrganizationNames();
361 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
363 v.push_back((*i)->cloneOrganizationName());
366 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
367 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
369 w.push_back((*j)->cloneOrganizationDisplayName());
372 VectorOf(OrganizationURL) x=getOrganizationURLs();
373 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
375 x.push_back((*k)->cloneOrganizationURL());
380 IMPL_XMLOBJECT_CLONE(Organization);
381 IMPL_TYPED_CHILD(Extensions);
382 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
383 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
384 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
387 void marshallAttributes(DOMElement* domElement) const {
388 marshallExtensionAttributes(domElement);
391 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
392 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
393 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
394 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
395 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
396 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
399 void processAttribute(const DOMAttr* attribute) {
400 unmarshallExtensionAttribute(attribute);
404 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
405 public AbstractComplexElement,
406 public AbstractAttributeExtensibleXMLObject,
407 public AbstractDOMCachingXMLObject,
408 public AbstractXMLObjectMarshaller,
409 public AbstractXMLObjectUnmarshaller
411 list<XMLObject*>::iterator m_pos_TelephoneNumber;
414 m_ContactType=nullptr;
415 m_children.push_back(nullptr);
416 m_children.push_back(nullptr);
417 m_children.push_back(nullptr);
418 m_children.push_back(nullptr);
419 m_children.push_back(nullptr);
420 m_Extensions=nullptr;
424 m_pos_Extensions=m_children.begin();
425 m_pos_Company=m_pos_Extensions;
427 m_pos_GivenName=m_pos_Company;
429 m_pos_SurName=m_pos_GivenName;
431 m_pos_TelephoneNumber=m_pos_SurName;
432 ++m_pos_TelephoneNumber;
435 virtual ~ContactPersonImpl() {
436 XMLString::release(&m_ContactType);
439 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
440 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
444 ContactPersonImpl(const ContactPersonImpl& src)
445 : AbstractXMLObject(src), AbstractComplexElement(src),
446 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
448 if (src.getExtensions())
449 setExtensions(src.getExtensions()->cloneExtensions());
450 if (src.getCompany())
451 setCompany(src.getCompany()->cloneCompany());
452 if (src.getGivenName())
453 setGivenName(src.getGivenName()->cloneGivenName());
454 if (src.getSurName())
455 setSurName(src.getSurName()->cloneSurName());
457 VectorOf(EmailAddress) v=getEmailAddresss();
458 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
460 v.push_back((*i)->cloneEmailAddress());
463 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
464 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
466 w.push_back((*j)->cloneTelephoneNumber());
471 IMPL_XMLOBJECT_CLONE(ContactPerson);
472 IMPL_STRING_ATTRIB(ContactType);
473 IMPL_TYPED_CHILD(Extensions);
474 IMPL_TYPED_CHILD(Company);
475 IMPL_TYPED_CHILD(GivenName);
476 IMPL_TYPED_CHILD(SurName);
477 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
478 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
480 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
481 if (!qualifiedName.hasNamespaceURI()) {
482 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
483 setContactType(value);
487 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
491 void marshallAttributes(DOMElement* domElement) const {
492 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
493 marshallExtensionAttributes(domElement);
496 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
497 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
498 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
499 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
500 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
501 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
502 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
503 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
506 void processAttribute(const DOMAttr* attribute) {
507 unmarshallExtensionAttribute(attribute);
511 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
512 public AbstractSimpleElement,
513 public AbstractDOMCachingXMLObject,
514 public AbstractXMLObjectMarshaller,
515 public AbstractXMLObjectUnmarshaller
522 virtual ~AdditionalMetadataLocationImpl() {
523 XMLString::release(&m_Namespace);
526 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
527 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
531 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
532 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
536 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
537 IMPL_STRING_ATTRIB(Namespace);
540 void marshallAttributes(DOMElement* domElement) const {
541 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
544 void processAttribute(const DOMAttr* attribute) {
545 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
546 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
550 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
551 public AbstractComplexElement,
552 public AbstractDOMCachingXMLObject,
553 public AbstractXMLObjectMarshaller,
554 public AbstractXMLObjectUnmarshaller
559 m_children.push_back(nullptr);
560 m_pos_KeyInfo=m_children.begin();
563 virtual ~KeyDescriptorImpl() {
564 XMLString::release(&m_Use);
567 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
568 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
572 KeyDescriptorImpl(const KeyDescriptorImpl& src)
573 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
575 setUse(src.getUse());
576 if (src.getKeyInfo())
577 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
578 VectorOf(EncryptionMethod) v=getEncryptionMethods();
579 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
581 v.push_back((*i)->cloneEncryptionMethod());
586 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
587 IMPL_STRING_ATTRIB(Use);
588 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
589 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
592 void marshallAttributes(DOMElement* domElement) const {
593 MARSHALL_STRING_ATTRIB(Use,USE,nullptr);
596 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
597 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
598 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
599 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
602 void processAttribute(const DOMAttr* attribute) {
603 PROC_STRING_ATTRIB(Use,USE,nullptr);
604 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
608 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
609 public AbstractAttributeExtensibleXMLObject,
610 public AbstractComplexElement,
611 public AbstractDOMCachingXMLObject,
612 public AbstractXMLObjectMarshaller,
613 public AbstractXMLObjectUnmarshaller
616 m_Binding=m_Location=m_ResponseLocation=nullptr;
625 virtual ~EndpointTypeImpl() {
626 XMLString::release(&m_Binding);
627 XMLString::release(&m_Location);
628 XMLString::release(&m_ResponseLocation);
631 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
632 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
635 EndpointTypeImpl(const EndpointTypeImpl& src)
636 : AbstractXMLObject(src),
637 AbstractAttributeExtensibleXMLObject(src),
638 AbstractComplexElement(src),
639 AbstractDOMCachingXMLObject(src) {
640 setBinding(src.getBinding());
641 setLocation(src.getLocation());
642 setResponseLocation(src.getResponseLocation());
643 VectorOf(XMLObject) v=getUnknownXMLObjects();
644 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
645 v.push_back((*i)->clone());
648 IMPL_XMLOBJECT_CLONE(EndpointType);
649 IMPL_STRING_ATTRIB(Binding);
650 IMPL_STRING_ATTRIB(Location);
651 IMPL_STRING_ATTRIB(ResponseLocation);
652 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
654 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
655 if (!qualifiedName.hasNamespaceURI()) {
656 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
660 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
664 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
665 setResponseLocation(value);
669 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
672 void marshallAttributes(DOMElement* domElement) const {
673 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
674 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
675 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
676 marshallExtensionAttributes(domElement);
679 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
681 const XMLCh* nsURI=root->getNamespaceURI();
682 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
683 getUnknownXMLObjects().push_back(childXMLObject);
686 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
689 void processAttribute(const DOMAttr* attribute) {
690 unmarshallExtensionAttribute(attribute);
694 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
698 m_isDefault=XML_BOOL_NULL;
702 IndexedEndpointTypeImpl() {
706 virtual ~IndexedEndpointTypeImpl() {
707 XMLString::release(&m_Index);
710 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
711 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
713 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
714 setIndex(src.m_Index);
715 isDefault(src.m_isDefault);
718 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
719 EndpointType* cloneEndpointType() const {
720 return new IndexedEndpointTypeImpl(*this);
723 IMPL_INTEGER_ATTRIB(Index);
724 IMPL_BOOLEAN_ATTRIB(isDefault);
726 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
727 if (!qualifiedName.hasNamespaceURI()) {
728 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
732 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
737 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
741 void marshallAttributes(DOMElement* domElement) const {
742 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
743 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
744 EndpointTypeImpl::marshallAttributes(domElement);
748 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
751 virtual ~ArtifactResolutionServiceImpl() {}
753 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
754 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
756 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
758 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
759 IndexedEndpointType* cloneIndexedEndpointType() const {
760 return new ArtifactResolutionServiceImpl(*this);
762 EndpointType* cloneEndpointType() const {
763 return new ArtifactResolutionServiceImpl(*this);
767 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
770 virtual ~SingleLogoutServiceImpl() {}
772 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
773 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
775 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
777 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
778 EndpointType* cloneEndpointType() const {
779 return new SingleLogoutServiceImpl(*this);
783 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
786 virtual ~ManageNameIDServiceImpl() {}
788 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
789 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
791 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
793 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
794 EndpointType* cloneEndpointType() const {
795 return new ManageNameIDServiceImpl(*this);
799 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
802 virtual ~SingleSignOnServiceImpl() {}
804 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
805 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
807 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
809 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
810 EndpointType* cloneEndpointType() const {
811 return new SingleSignOnServiceImpl(*this);
815 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
818 virtual ~NameIDMappingServiceImpl() {}
820 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
821 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
823 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
825 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
826 EndpointType* cloneEndpointType() const {
827 return new NameIDMappingServiceImpl(*this);
831 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
834 virtual ~AssertionIDRequestServiceImpl() {}
836 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
837 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
839 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
841 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
842 EndpointType* cloneEndpointType() const {
843 return new AssertionIDRequestServiceImpl(*this);
847 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
850 virtual ~AssertionConsumerServiceImpl() {}
852 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
853 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
855 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
857 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
858 EndpointType* cloneEndpointType() const {
859 return new AssertionConsumerServiceImpl(*this);
861 IndexedEndpointType* cloneIndexedEndpointType() const {
862 return new AssertionConsumerServiceImpl(*this);
866 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
869 virtual ~AuthnQueryServiceImpl() {}
871 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
872 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
874 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
876 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
877 EndpointType* cloneEndpointType() const {
878 return new AuthnQueryServiceImpl(*this);
882 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
885 virtual ~AuthzServiceImpl() {}
887 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
888 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
890 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
892 IMPL_XMLOBJECT_CLONE(AuthzService);
893 EndpointType* cloneEndpointType() const {
894 return new AuthzServiceImpl(*this);
898 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
901 virtual ~AttributeServiceImpl() {}
903 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
904 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
906 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
908 IMPL_XMLOBJECT_CLONE(AttributeService);
909 EndpointType* cloneEndpointType() const {
910 return new AttributeServiceImpl(*this);
914 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
915 public virtual SignableObject,
916 public AbstractComplexElement,
917 public AbstractAttributeExtensibleXMLObject,
918 public AbstractDOMCachingXMLObject,
919 public AbstractXMLObjectMarshaller,
920 public AbstractXMLObjectUnmarshaller
923 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
924 m_ValidUntil=m_CacheDuration=nullptr;
925 m_children.push_back(nullptr);
926 m_children.push_back(nullptr);
927 m_children.push_back(nullptr);
928 m_children.push_back(nullptr);
930 m_Extensions=nullptr;
931 m_Organization=nullptr;
932 m_pos_Signature=m_children.begin();
933 m_pos_Extensions=m_pos_Signature;
935 m_pos_Organization=m_pos_Extensions;
936 ++m_pos_Organization;
937 m_pos_ContactPerson=m_pos_Organization;
938 ++m_pos_ContactPerson;
942 list<XMLObject*>::iterator m_pos_ContactPerson;
944 RoleDescriptorImpl() {
949 virtual ~RoleDescriptorImpl() {
950 XMLString::release(&m_ID);
951 XMLString::release(&m_ProtocolSupportEnumeration);
952 XMLString::release(&m_ErrorURL);
954 delete m_CacheDuration;
957 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
958 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
962 RoleDescriptorImpl(const RoleDescriptorImpl& src)
963 : AbstractXMLObject(src), AbstractComplexElement(src),
964 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
967 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
968 setErrorURL(src.getErrorURL());
969 setValidUntil(src.getValidUntil());
970 setCacheDuration(src.getCacheDuration());
971 if (src.getSignature())
972 setSignature(src.getSignature()->cloneSignature());
973 if (src.getExtensions())
974 setExtensions(src.getExtensions()->cloneExtensions());
975 if (src.getOrganization())
976 setOrganization(src.getOrganization()->cloneOrganization());
978 VectorOf(KeyDescriptor) v=getKeyDescriptors();
979 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
981 v.push_back((*i)->cloneKeyDescriptor());
984 VectorOf(ContactPerson) w=getContactPersons();
985 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
987 w.push_back((*j)->cloneContactPerson());
992 //IMPL_TYPED_CHILD(Signature);
993 // Need customized setter.
995 Signature* m_Signature;
996 list<XMLObject*>::iterator m_pos_Signature;
998 Signature* getSignature() const {
1002 void setSignature(Signature* sig) {
1003 prepareForAssignment(m_Signature,sig);
1004 *m_pos_Signature=m_Signature=sig;
1005 // Sync content reference back up.
1007 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1010 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1011 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
1012 IMPL_STRING_ATTRIB(ErrorURL);
1013 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1014 IMPL_DURATION_ATTRIB(CacheDuration,0);
1015 IMPL_TYPED_CHILD(Extensions);
1016 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
1017 IMPL_TYPED_CHILD(Organization);
1018 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1020 bool hasSupport(const XMLCh* protocol) const {
1021 if (!protocol || !*protocol)
1023 if (m_ProtocolSupportEnumeration) {
1024 // Look for first character.
1025 xsecsize_t len=XMLString::stringLen(protocol);
1027 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1029 // Only possible match is if it's the first character or a space comes before it.
1030 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1031 // See if rest of protocol string is present.
1032 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1033 // Only possible match is if it's the last character or a space comes after it.
1034 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1040 // Move past last search and start again.
1045 // Move past last search and start again.
1048 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1054 void addSupport(const XMLCh* protocol) {
1055 if (hasSupport(protocol))
1057 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1058 #ifdef HAVE_GOOD_STL
1059 xstring pse(m_ProtocolSupportEnumeration);
1060 pse = pse + chSpace + protocol;
1061 setProtocolSupportEnumeration(pse.c_str());
1063 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1064 auto_ptr_char temp2(protocol);
1065 string pse(temp.get());
1066 pse = pse + ' ' + temp2.get();
1067 auto_ptr_XMLCh temp3(pse.c_str());
1068 setProtocolSupportEnumeration(temp3.get());
1072 setProtocolSupportEnumeration(protocol);
1076 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1077 if (!qualifiedName.hasNamespaceURI()) {
1078 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1082 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1083 setProtocolSupportEnumeration(value);
1086 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1090 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1091 setValidUntil(value);
1094 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1095 setCacheDuration(value);
1099 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1103 void prepareForMarshalling() const {
1105 declareNonVisibleNamespaces();
1108 void marshallAttributes(DOMElement* domElement) const {
1109 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1110 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
1111 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
1112 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1113 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1114 marshallExtensionAttributes(domElement);
1117 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1118 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1119 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1120 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1121 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1122 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1123 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1126 void processAttribute(const DOMAttr* attribute) {
1127 PROC_ID_ATTRIB(ID,ID,nullptr);
1128 unmarshallExtensionAttribute(attribute);
1132 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1135 virtual ~RoleDescriptorTypeImpl() {}
1137 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1138 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1141 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1142 VectorOf(XMLObject) v=getUnknownXMLObjects();
1143 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1144 v.push_back((*i)->clone());
1147 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1148 RoleDescriptor* cloneRoleDescriptor() const {
1149 return new RoleDescriptorTypeImpl(*this);
1152 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1155 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1156 getUnknownXMLObjects().push_back(childXMLObject);
1160 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1163 m_children.push_back(nullptr);
1164 m_children.push_back(nullptr);
1165 m_children.push_back(nullptr);
1166 m_children.push_back(nullptr);
1167 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1168 ++m_pos_ArtifactResolutionService;
1169 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1170 ++m_pos_SingleLogoutService;
1171 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1172 ++m_pos_ManageNameIDService;
1173 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1174 ++m_pos_NameIDFormat;
1178 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1179 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1180 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1181 list<XMLObject*>::iterator m_pos_NameIDFormat;
1183 SSODescriptorTypeImpl() {
1188 virtual ~SSODescriptorTypeImpl() {}
1190 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1191 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1195 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1197 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1198 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1200 v.push_back((*i)->cloneArtifactResolutionService());
1203 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1204 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1206 w.push_back((*j)->cloneSingleLogoutService());
1209 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1210 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1212 x.push_back((*k)->cloneManageNameIDService());
1215 VectorOf(NameIDFormat) y=getNameIDFormats();
1216 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1218 y.push_back((*m)->cloneNameIDFormat());
1223 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1224 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1225 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1226 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1229 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1230 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1231 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1232 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1233 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1234 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1238 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1240 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1241 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1242 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1243 list<XMLObject*>::iterator m_pos_AttributeProfile;
1246 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1247 m_children.push_back(nullptr);
1248 m_children.push_back(nullptr);
1249 m_children.push_back(nullptr);
1250 m_children.push_back(nullptr);
1251 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1252 ++m_pos_SingleSignOnService;
1253 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1254 ++m_pos_NameIDMappingService;
1255 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1256 ++m_pos_AssertionIDRequestService;
1257 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1258 ++m_pos_AttributeProfile;
1262 virtual ~IDPSSODescriptorImpl() {}
1264 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1265 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1269 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1271 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1272 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1273 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1275 v.push_back((*i)->cloneSingleSignOnService());
1278 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1279 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1281 w.push_back((*j)->cloneNameIDMappingService());
1284 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1285 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1287 x.push_back((*k)->cloneAssertionIDRequestService());
1290 VectorOf(AttributeProfile) y=getAttributeProfiles();
1291 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1293 y.push_back((*m)->cloneAttributeProfile());
1296 VectorOf(Attribute) z=getAttributes();
1297 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1299 z.push_back((*n)->cloneAttribute());
1304 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1305 SSODescriptorType* cloneSSODescriptorType() const {
1306 return new IDPSSODescriptorImpl(*this);
1308 RoleDescriptor* cloneRoleDescriptor() const {
1309 return new IDPSSODescriptorImpl(*this);
1312 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1313 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1314 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1315 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1316 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1317 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1319 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1320 if (!qualifiedName.hasNamespaceURI()) {
1321 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1322 setWantAuthnRequestsSigned(value);
1326 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1330 void marshallAttributes(DOMElement* domElement) const {
1331 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1332 RoleDescriptorImpl::marshallAttributes(domElement);
1335 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1336 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1337 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1338 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1339 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1340 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1341 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1345 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1346 public AbstractComplexElement,
1347 public AbstractAttributeExtensibleXMLObject,
1348 public AbstractDOMCachingXMLObject,
1349 public AbstractXMLObjectMarshaller,
1350 public AbstractXMLObjectUnmarshaller
1353 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1354 m_isRequired=XML_BOOL_NULL;
1357 virtual ~RequestedAttributeImpl() {
1358 XMLString::release(&m_Name);
1359 XMLString::release(&m_NameFormat);
1360 XMLString::release(&m_FriendlyName);
1363 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1364 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1368 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1369 : AbstractXMLObject(src), AbstractComplexElement(src),
1370 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1372 setName(src.getName());
1373 setNameFormat(src.getNameFormat());
1374 setFriendlyName(src.getFriendlyName());
1375 isRequired(src.m_isRequired);
1376 VectorOf(XMLObject) v=getAttributeValues();
1377 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1379 v.push_back((*i)->clone());
1384 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1385 Attribute* cloneAttribute() const {
1386 return new RequestedAttributeImpl(*this);
1389 IMPL_STRING_ATTRIB(Name);
1390 IMPL_STRING_ATTRIB(NameFormat);
1391 IMPL_STRING_ATTRIB(FriendlyName);
1392 IMPL_BOOLEAN_ATTRIB(isRequired);
1393 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1395 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1396 if (!qualifiedName.hasNamespaceURI()) {
1397 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1401 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1402 setNameFormat(value);
1405 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1406 setFriendlyName(value);
1409 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1410 setisRequired(value);
1414 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1418 void marshallAttributes(DOMElement* domElement) const {
1419 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1420 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1421 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1422 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1423 marshallExtensionAttributes(domElement);
1426 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1427 getAttributeValues().push_back(childXMLObject);
1430 void processAttribute(const DOMAttr* attribute) {
1431 unmarshallExtensionAttribute(attribute);
1435 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1436 public AbstractComplexElement,
1437 public AbstractDOMCachingXMLObject,
1438 public AbstractXMLObjectMarshaller,
1439 public AbstractXMLObjectUnmarshaller
1441 list<XMLObject*>::iterator m_pos_ServiceDescription;
1442 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1446 m_isDefault=XML_BOOL_NULL;
1447 m_children.push_back(nullptr);
1448 m_children.push_back(nullptr);
1449 m_pos_ServiceDescription=m_children.begin();
1450 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1451 ++m_pos_RequestedAttribute;
1455 virtual ~AttributeConsumingServiceImpl() {
1456 XMLString::release(&m_Index);
1459 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1460 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1464 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1465 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1467 setIndex(src.m_Index);
1468 isDefault(src.m_isDefault);
1469 VectorOf(ServiceName) v=getServiceNames();
1470 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1472 v.push_back((*i)->cloneServiceName());
1475 VectorOf(ServiceDescription) w=getServiceDescriptions();
1476 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1478 w.push_back((*j)->cloneServiceDescription());
1481 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1482 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1484 x.push_back((*k)->cloneRequestedAttribute());
1489 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1490 IMPL_INTEGER_ATTRIB(Index);
1491 IMPL_BOOLEAN_ATTRIB(isDefault);
1492 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1493 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1494 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1497 void marshallAttributes(DOMElement* domElement) const {
1498 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1499 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1502 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1503 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1504 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1505 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1506 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1509 void processAttribute(const DOMAttr* attribute) {
1510 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1511 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1512 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1516 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1518 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1521 m_AuthnRequestsSigned=XML_BOOL_NULL;
1522 m_WantAssertionsSigned=XML_BOOL_NULL;
1523 m_children.push_back(nullptr);
1524 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1525 ++m_pos_AssertionConsumerService;
1529 virtual ~SPSSODescriptorImpl() {}
1531 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1532 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1536 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1538 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1539 WantAssertionsSigned(src.m_WantAssertionsSigned);
1540 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1541 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1543 v.push_back((*i)->cloneAssertionConsumerService());
1546 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1547 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1549 w.push_back((*j)->cloneAttributeConsumingService());
1554 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1555 SSODescriptorType* cloneSSODescriptorType() const {
1556 return cloneSPSSODescriptor();
1558 RoleDescriptor* cloneRoleDescriptor() const {
1559 return cloneSPSSODescriptor();
1562 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1563 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1564 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1565 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1567 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1568 if (!qualifiedName.hasNamespaceURI()) {
1569 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1570 setAuthnRequestsSigned(value);
1573 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1574 setWantAssertionsSigned(value);
1578 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1582 void marshallAttributes(DOMElement* domElement) const {
1583 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1584 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1585 RoleDescriptorImpl::marshallAttributes(domElement);
1588 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1589 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1590 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1591 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1595 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1597 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1598 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1601 m_children.push_back(nullptr);
1602 m_children.push_back(nullptr);
1603 m_pos_AuthnQueryService=m_pos_ContactPerson;
1604 ++m_pos_AuthnQueryService;
1605 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1606 ++m_pos_AssertionIDRequestService;
1610 virtual ~AuthnAuthorityDescriptorImpl() {}
1612 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1613 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1617 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1619 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1620 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1622 v.push_back((*i)->cloneAuthnQueryService());
1625 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1626 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1628 w.push_back((*j)->cloneAssertionIDRequestService());
1631 VectorOf(NameIDFormat) x=getNameIDFormats();
1632 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1634 x.push_back((*k)->cloneNameIDFormat());
1639 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1640 RoleDescriptor* cloneRoleDescriptor() const {
1641 return cloneAuthnAuthorityDescriptor();
1644 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1645 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1646 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1649 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1650 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1651 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1652 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1653 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1657 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1659 list<XMLObject*>::iterator m_pos_AuthzService;
1660 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1663 m_children.push_back(nullptr);
1664 m_children.push_back(nullptr);
1665 m_pos_AuthzService=m_pos_ContactPerson;
1666 ++m_pos_AuthzService;
1667 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1668 ++m_pos_AssertionIDRequestService;
1672 virtual ~PDPDescriptorImpl() {}
1674 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1675 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1679 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1681 VectorOf(AuthzService) v=getAuthzServices();
1682 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1684 v.push_back((*i)->cloneAuthzService());
1687 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1688 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1690 w.push_back((*j)->cloneAssertionIDRequestService());
1693 VectorOf(NameIDFormat) x=getNameIDFormats();
1694 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1696 x.push_back((*k)->cloneNameIDFormat());
1701 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1702 RoleDescriptor* cloneRoleDescriptor() const {
1703 return clonePDPDescriptor();
1706 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1707 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1708 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1711 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1712 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1713 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1714 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1715 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1719 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1721 list<XMLObject*>::iterator m_pos_AttributeService;
1722 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1723 list<XMLObject*>::iterator m_pos_NameIDFormat;
1724 list<XMLObject*>::iterator m_pos_AttributeProfile;
1727 m_children.push_back(nullptr);
1728 m_children.push_back(nullptr);
1729 m_children.push_back(nullptr);
1730 m_children.push_back(nullptr);
1731 m_pos_AttributeService=m_pos_ContactPerson;
1732 ++m_pos_AttributeService;
1733 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1734 ++m_pos_AssertionIDRequestService;
1735 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1736 ++m_pos_NameIDFormat;
1737 m_pos_AttributeProfile=m_pos_NameIDFormat;
1738 ++m_pos_AttributeProfile;
1742 virtual ~AttributeAuthorityDescriptorImpl() {}
1744 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1745 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1749 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1751 VectorOf(AttributeService) v=getAttributeServices();
1752 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1754 v.push_back((*i)->cloneAttributeService());
1757 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1758 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1760 w.push_back((*j)->cloneAssertionIDRequestService());
1763 VectorOf(NameIDFormat) x=getNameIDFormats();
1764 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1766 x.push_back((*k)->cloneNameIDFormat());
1769 VectorOf(AttributeProfile) y=getAttributeProfiles();
1770 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1772 y.push_back((*m)->cloneAttributeProfile());
1775 VectorOf(Attribute) z=getAttributes();
1776 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1778 z.push_back((*n)->cloneAttribute());
1783 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1784 RoleDescriptor* cloneRoleDescriptor() const {
1785 return cloneAttributeAuthorityDescriptor();
1788 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1789 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1790 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1791 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1792 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1795 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1796 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1797 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1798 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1799 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1800 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1801 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1805 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1808 m_WantAssertionsSigned=XML_BOOL_NULL;
1809 m_children.push_back(nullptr);
1810 m_pos_NameIDFormat=m_pos_ContactPerson;
1811 ++m_pos_NameIDFormat;
1815 list<XMLObject*>::iterator m_pos_NameIDFormat;
1817 QueryDescriptorTypeImpl() {
1822 virtual ~QueryDescriptorTypeImpl() {}
1824 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1825 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1829 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1831 WantAssertionsSigned(src.m_WantAssertionsSigned);
1832 VectorOf(NameIDFormat) y=getNameIDFormats();
1833 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1835 y.push_back((*m)->cloneNameIDFormat());
1840 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1841 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1843 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1844 if (!qualifiedName.hasNamespaceURI()) {
1845 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1846 setWantAssertionsSigned(value);
1850 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1854 void marshallAttributes(DOMElement* domElement) const {
1855 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1856 RoleDescriptorImpl::marshallAttributes(domElement);
1859 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1860 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1861 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1865 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1868 virtual ~AuthnQueryDescriptorTypeImpl() {}
1870 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1871 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1873 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1875 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1876 QueryDescriptorType* cloneQueryDescriptorType() const {
1877 return new AuthnQueryDescriptorTypeImpl(*this);
1879 RoleDescriptor* cloneRoleDescriptor() const {
1880 return new AuthnQueryDescriptorTypeImpl(*this);
1884 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1887 virtual ~AttributeQueryDescriptorTypeImpl() {}
1889 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1890 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1892 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1893 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1894 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1895 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1897 w.push_back((*j)->cloneAttributeConsumingService());
1902 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1903 QueryDescriptorType* cloneQueryDescriptorType() const {
1904 return new AttributeQueryDescriptorTypeImpl(*this);
1906 RoleDescriptor* cloneRoleDescriptor() const {
1907 return new AttributeQueryDescriptorTypeImpl(*this);
1910 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1913 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1914 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1915 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1919 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1922 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1924 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1925 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1927 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1928 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1929 VectorOf(ActionNamespace) w=getActionNamespaces();
1930 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1932 w.push_back((*j)->cloneActionNamespace());
1937 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1938 QueryDescriptorType* cloneQueryDescriptorType() const {
1939 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1941 RoleDescriptor* cloneRoleDescriptor() const {
1942 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1945 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1948 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1949 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1950 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1954 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1955 public virtual SignableObject,
1956 public AbstractComplexElement,
1957 public AbstractAttributeExtensibleXMLObject,
1958 public AbstractDOMCachingXMLObject,
1959 public AbstractXMLObjectMarshaller,
1960 public AbstractXMLObjectUnmarshaller
1962 list<XMLObject*>::iterator m_pos_AffiliateMember;
1965 m_ID=m_AffiliationOwnerID=nullptr;
1966 m_ValidUntil=m_CacheDuration=nullptr;
1967 m_children.push_back(nullptr);
1968 m_children.push_back(nullptr);
1969 m_children.push_back(nullptr);
1970 m_Signature=nullptr;
1971 m_Extensions=nullptr;
1972 m_pos_Signature=m_children.begin();
1973 m_pos_Extensions=m_pos_Signature;
1975 m_pos_AffiliateMember=m_pos_Extensions;
1976 ++m_pos_AffiliateMember;
1980 virtual ~AffiliationDescriptorImpl() {
1981 XMLString::release(&m_ID);
1982 XMLString::release(&m_AffiliationOwnerID);
1983 delete m_ValidUntil;
1984 delete m_CacheDuration;
1987 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1988 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1992 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1993 : AbstractXMLObject(src), AbstractComplexElement(src),
1994 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1997 setAffiliationOwnerID(src.getAffiliationOwnerID());
1998 setValidUntil(src.getValidUntil());
1999 setCacheDuration(src.getCacheDuration());
2000 if (src.getSignature())
2001 setSignature(src.getSignature()->cloneSignature());
2002 if (src.getExtensions())
2003 setExtensions(src.getExtensions()->cloneExtensions());
2005 VectorOf(KeyDescriptor) v=getKeyDescriptors();
2006 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
2008 v.push_back((*i)->cloneKeyDescriptor());
2011 VectorOf(AffiliateMember) w=getAffiliateMembers();
2012 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
2014 w.push_back((*j)->cloneAffiliateMember());
2019 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
2021 //IMPL_TYPED_CHILD(Signature);
2022 // Need customized setter.
2024 Signature* m_Signature;
2025 list<XMLObject*>::iterator m_pos_Signature;
2027 Signature* getSignature() const {
2031 void setSignature(Signature* sig) {
2032 prepareForAssignment(m_Signature,sig);
2033 *m_pos_Signature=m_Signature=sig;
2034 // Sync content reference back up.
2036 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2039 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2040 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2041 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2042 IMPL_DURATION_ATTRIB(CacheDuration,0);
2043 IMPL_TYPED_CHILD(Extensions);
2044 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2045 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2047 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2048 if (!qualifiedName.hasNamespaceURI()) {
2049 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2053 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2054 setAffiliationOwnerID(value);
2057 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2058 setValidUntil(value);
2061 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2062 setCacheDuration(value);
2066 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2070 void prepareForMarshalling() const {
2072 declareNonVisibleNamespaces();
2075 void marshallAttributes(DOMElement* domElement) const {
2076 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2077 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
2078 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2079 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2080 marshallExtensionAttributes(domElement);
2083 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2084 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2085 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2086 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2087 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2088 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2091 void processAttribute(const DOMAttr* attribute) {
2092 PROC_ID_ATTRIB(ID,ID,nullptr);
2093 unmarshallExtensionAttribute(attribute);
2097 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2098 public virtual SignableObject,
2099 public AbstractComplexElement,
2100 public AbstractAttributeExtensibleXMLObject,
2101 public AbstractDOMCachingXMLObject,
2102 public AbstractXMLObjectMarshaller,
2103 public AbstractXMLObjectUnmarshaller
2105 list<XMLObject*>::iterator m_pos_ContactPerson;
2108 m_ID=m_EntityID=nullptr;
2109 m_ValidUntil=m_CacheDuration=nullptr;
2110 m_children.push_back(nullptr);
2111 m_children.push_back(nullptr);
2112 m_children.push_back(nullptr);
2113 m_children.push_back(nullptr);
2114 m_children.push_back(nullptr);
2115 m_Signature=nullptr;
2116 m_Extensions=nullptr;
2117 m_AffiliationDescriptor=nullptr;
2118 m_Organization=nullptr;
2119 m_pos_Signature=m_children.begin();
2120 m_pos_Extensions=m_pos_Signature;
2122 m_pos_AffiliationDescriptor=m_pos_Extensions;
2123 ++m_pos_AffiliationDescriptor;
2124 m_pos_Organization=m_pos_AffiliationDescriptor;
2125 ++m_pos_Organization;
2126 m_pos_ContactPerson=m_pos_Organization;
2127 ++m_pos_ContactPerson;
2131 virtual ~EntityDescriptorImpl() {
2132 XMLString::release(&m_ID);
2133 XMLString::release(&m_EntityID);
2134 delete m_ValidUntil;
2135 delete m_CacheDuration;
2138 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2139 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2143 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2144 : AbstractXMLObject(src), AbstractComplexElement(src),
2145 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2148 setEntityID(src.getEntityID());
2149 setValidUntil(src.getValidUntil());
2150 setCacheDuration(src.getCacheDuration());
2151 if (src.getSignature())
2152 setSignature(src.getSignature()->cloneSignature());
2153 if (src.getExtensions())
2154 setExtensions(src.getExtensions()->cloneExtensions());
2155 if (src.getAffiliationDescriptor())
2156 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2157 if (src.getOrganization())
2158 setOrganization(src.getOrganization()->cloneOrganization());
2160 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2162 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2164 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2168 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2170 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2174 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2176 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2180 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2182 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2186 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2188 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2192 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2194 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2198 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2200 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2204 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2206 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2210 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2212 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2218 VectorOf(ContactPerson) v=getContactPersons();
2219 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2221 v.push_back((*j)->cloneContactPerson());
2224 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2225 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2227 w.push_back((*k)->cloneAdditionalMetadataLocation());
2232 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2234 //IMPL_TYPED_CHILD(Signature);
2235 // Need customized setter.
2237 Signature* m_Signature;
2238 list<XMLObject*>::iterator m_pos_Signature;
2240 Signature* getSignature() const {
2244 void setSignature(Signature* sig) {
2245 prepareForAssignment(m_Signature,sig);
2246 *m_pos_Signature=m_Signature=sig;
2247 // Sync content reference back up.
2249 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2252 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2253 IMPL_STRING_ATTRIB(EntityID);
2254 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2255 IMPL_DURATION_ATTRIB(CacheDuration,0);
2256 IMPL_TYPED_CHILD(Extensions);
2257 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2258 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2259 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2260 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2261 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2262 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2263 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2264 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2265 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2266 IMPL_TYPED_CHILD(AffiliationDescriptor);
2267 IMPL_TYPED_CHILD(Organization);
2268 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2269 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2271 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2272 if (!qualifiedName.hasNamespaceURI()) {
2273 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2277 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2281 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2282 setValidUntil(value);
2285 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2286 setCacheDuration(value);
2290 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2293 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2294 // Check for "known" elements/types.
2295 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2296 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2297 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2298 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2299 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2300 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2301 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2302 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2303 if (qname == PDPDescriptor::ELEMENT_QNAME)
2304 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2305 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2306 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2307 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2308 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2309 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2310 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2312 vector<RoleDescriptor*>::const_iterator i =
2313 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2314 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2318 void prepareForMarshalling() const {
2320 declareNonVisibleNamespaces();
2323 void marshallAttributes(DOMElement* domElement) const {
2324 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2325 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2326 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2327 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2328 marshallExtensionAttributes(domElement);
2331 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2332 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2333 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2334 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2335 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2336 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2337 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2338 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2339 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2340 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2341 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2342 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2343 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2344 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2345 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2346 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2347 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2350 void processAttribute(const DOMAttr* attribute) {
2351 PROC_ID_ATTRIB(ID,ID,nullptr);
2352 unmarshallExtensionAttribute(attribute);
2356 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2357 public virtual SignableObject,
2358 public AbstractComplexElement,
2359 public AbstractDOMCachingXMLObject,
2360 public AbstractXMLObjectMarshaller,
2361 public AbstractXMLObjectUnmarshaller
2364 m_ID=m_Name=nullptr;
2365 m_ValidUntil=m_CacheDuration=nullptr;
2366 m_children.push_back(nullptr);
2367 m_children.push_back(nullptr);
2368 m_Signature=nullptr;
2369 m_Extensions=nullptr;
2370 m_pos_Signature=m_children.begin();
2371 m_pos_Extensions=m_pos_Signature;
2376 virtual ~EntitiesDescriptorImpl() {
2377 XMLString::release(&m_ID);
2378 XMLString::release(&m_Name);
2379 delete m_ValidUntil;
2380 delete m_CacheDuration;
2383 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2384 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2388 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2389 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2392 setName(src.getName());
2393 setValidUntil(src.getValidUntil());
2394 setCacheDuration(src.getCacheDuration());
2395 if (src.getSignature())
2396 setSignature(src.getSignature()->cloneSignature());
2397 if (src.getExtensions())
2398 setExtensions(src.getExtensions()->cloneExtensions());
2400 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2402 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2404 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2408 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2410 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2417 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2419 //IMPL_TYPED_CHILD(Signature);
2420 // Need customized setter.
2422 Signature* m_Signature;
2423 list<XMLObject*>::iterator m_pos_Signature;
2425 Signature* getSignature() const {
2429 void setSignature(Signature* sig) {
2430 prepareForAssignment(m_Signature,sig);
2431 *m_pos_Signature=m_Signature=sig;
2432 // Sync content reference back up.
2434 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2437 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2438 IMPL_STRING_ATTRIB(Name);
2439 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2440 IMPL_DURATION_ATTRIB(CacheDuration,0);
2441 IMPL_TYPED_CHILD(Extensions);
2442 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2443 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2446 void prepareForMarshalling() const {
2448 declareNonVisibleNamespaces();
2451 void marshallAttributes(DOMElement* domElement) const {
2452 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2453 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2454 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2455 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2458 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2459 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2460 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2461 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2462 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2463 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2466 void processAttribute(const DOMAttr* attribute) {
2467 PROC_ID_ATTRIB(ID,ID,nullptr);
2468 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2469 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2470 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2474 class SAML_DLLLOCAL DiscoveryResponseImpl : public virtual DiscoveryResponse, public IndexedEndpointTypeImpl
2477 virtual ~DiscoveryResponseImpl() {}
2479 DiscoveryResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2480 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2482 DiscoveryResponseImpl(const DiscoveryResponseImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
2484 IMPL_XMLOBJECT_CLONE(DiscoveryResponse);
2485 IndexedEndpointType* cloneIndexedEndpointType() const {
2486 return new DiscoveryResponseImpl(*this);
2488 EndpointType* cloneEndpointType() const {
2489 return new DiscoveryResponseImpl(*this);
2493 class SAML_DLLLOCAL RequestInitiatorImpl : public virtual RequestInitiator, public EndpointTypeImpl
2496 virtual ~RequestInitiatorImpl() {}
2498 RequestInitiatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2499 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2501 RequestInitiatorImpl(const RequestInitiatorImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
2503 IMPL_XMLOBJECT_CLONE(RequestInitiator);
2504 EndpointType* cloneEndpointType() const {
2505 return new RequestInitiatorImpl(*this);
2509 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2510 public AbstractComplexElement,
2511 public AbstractDOMCachingXMLObject,
2512 public AbstractXMLObjectMarshaller,
2513 public AbstractXMLObjectUnmarshaller
2516 virtual ~EntityAttributesImpl() {}
2518 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2519 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2522 EntityAttributesImpl(const EntityAttributesImpl& src)
2523 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2524 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2526 Attribute* a=dynamic_cast<Attribute*>(*i);
2528 getAttributes().push_back(a->cloneAttribute());
2532 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2534 getAssertions().push_back(as->cloneAssertion());
2541 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2543 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2544 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2547 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2548 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2549 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2550 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2554 class SAML_DLLLOCAL DigestMethodImpl : public virtual DigestMethod,
2555 public AbstractComplexElement,
2556 public AbstractDOMCachingXMLObject,
2557 public AbstractXMLObjectMarshaller,
2558 public AbstractXMLObjectUnmarshaller
2561 virtual ~DigestMethodImpl() {
2562 XMLString::release(&m_Algorithm);
2565 DigestMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2566 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2567 m_Algorithm = nullptr;
2570 DigestMethodImpl(const DigestMethodImpl& src)
2571 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2572 setAlgorithm(src.getAlgorithm());
2573 VectorOf(XMLObject) v=getUnknownXMLObjects();
2574 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
2575 v.push_back((*i)->clone());
2578 IMPL_STRING_ATTRIB(Algorithm);
2580 IMPL_XMLOBJECT_CLONE(DigestMethod);
2581 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2584 void marshallAttributes(DOMElement* domElement) const {
2585 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2588 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2590 getUnknownXMLObjects().push_back(childXMLObject);
2593 void processAttribute(const DOMAttr* attribute) {
2594 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2598 class SAML_DLLLOCAL SigningMethodImpl : public virtual SigningMethod,
2599 public AbstractComplexElement,
2600 public AbstractDOMCachingXMLObject,
2601 public AbstractXMLObjectMarshaller,
2602 public AbstractXMLObjectUnmarshaller
2605 virtual ~SigningMethodImpl() {
2606 XMLString::release(&m_Algorithm);
2607 XMLString::release(&m_MinKeySize);
2608 XMLString::release(&m_MaxKeySize);
2611 SigningMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2612 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2613 m_Algorithm = nullptr;
2614 m_MinKeySize = nullptr;
2615 m_MaxKeySize = nullptr;
2618 SigningMethodImpl(const SigningMethodImpl& src)
2619 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2620 setAlgorithm(src.getAlgorithm());
2621 setMinKeySize(src.m_MinKeySize);
2622 setMaxKeySize(src.m_MaxKeySize);
2623 VectorOf(XMLObject) v=getUnknownXMLObjects();
2624 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
2625 v.push_back((*i)->clone());
2628 IMPL_XMLOBJECT_CLONE(SigningMethod);
2629 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2631 IMPL_STRING_ATTRIB(Algorithm);
2632 IMPL_INTEGER_ATTRIB(MinKeySize);
2633 IMPL_INTEGER_ATTRIB(MaxKeySize);
2636 void marshallAttributes(DOMElement* domElement) const {
2637 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2638 MARSHALL_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2639 MARSHALL_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2642 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2644 getUnknownXMLObjects().push_back(childXMLObject);
2647 void processAttribute(const DOMAttr* attribute) {
2648 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2649 PROC_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2650 PROC_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2654 class SAML_DLLLOCAL DisplayNameImpl : public virtual DisplayName, public localizedNameTypeImpl
2657 virtual ~DisplayNameImpl() {}
2659 DisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2660 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2662 DisplayNameImpl(const DisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2664 IMPL_XMLOBJECT_CLONE(DisplayName);
2665 localizedNameType* clonelocalizedNameType() const {
2666 return new DisplayNameImpl(*this);
2670 class SAML_DLLLOCAL DescriptionImpl : public virtual Description, public localizedNameTypeImpl
2673 virtual ~DescriptionImpl() {}
2675 DescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2676 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2678 DescriptionImpl(const DescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2680 IMPL_XMLOBJECT_CLONE(Description);
2681 localizedNameType* clonelocalizedNameType() const {
2682 return new DescriptionImpl(*this);
2686 class SAML_DLLLOCAL InformationURLImpl : public virtual InformationURL, public localizedURITypeImpl
2689 virtual ~InformationURLImpl() {}
2691 InformationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2692 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2694 InformationURLImpl(const InformationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2696 IMPL_XMLOBJECT_CLONE(InformationURL);
2697 localizedURIType* clonelocalizedURIType() const {
2698 return new InformationURLImpl(*this);
2702 class SAML_DLLLOCAL PrivacyStatementURLImpl : public virtual PrivacyStatementURL, public localizedURITypeImpl
2705 virtual ~PrivacyStatementURLImpl() {}
2707 PrivacyStatementURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2708 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2710 PrivacyStatementURLImpl(const PrivacyStatementURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2712 IMPL_XMLOBJECT_CLONE(PrivacyStatementURL);
2713 localizedURIType* clonelocalizedURIType() const {
2714 return new PrivacyStatementURLImpl(*this);
2718 class SAML_DLLLOCAL KeywordsImpl : public virtual Keywords,
2719 public AbstractSimpleElement,
2720 public AbstractDOMCachingXMLObject,
2721 public AbstractXMLObjectMarshaller,
2722 public AbstractXMLObjectUnmarshaller
2726 m_LangPrefix=nullptr;
2735 virtual ~KeywordsImpl() {
2736 XMLString::release(&m_Lang);
2737 XMLString::release(&m_LangPrefix);
2740 KeywordsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2741 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2745 KeywordsImpl(const KeywordsImpl& src)
2746 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2748 setLang(src.getLang());
2749 if (src.m_LangPrefix)
2750 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
2753 IMPL_XMLOBJECT_CLONE(Keywords);
2754 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2757 void marshallAttributes(DOMElement* domElement) const {
2758 if (m_Lang && *m_Lang) {
2759 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2760 if (m_LangPrefix && *m_LangPrefix)
2761 attr->setPrefix(m_LangPrefix);
2763 attr->setPrefix(xmlconstants::XML_PREFIX);
2764 attr->setNodeValue(m_Lang);
2765 domElement->setAttributeNodeNS(attr);
2769 void processAttribute(const DOMAttr* attribute) {
2770 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2771 setLang(attribute->getValue());
2772 const XMLCh* temp = attribute->getPrefix();
2773 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2774 m_LangPrefix = XMLString::replicate(temp);
2777 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2781 class SAML_DLLLOCAL LogoImpl : public virtual Logo,
2782 public AbstractSimpleElement,
2783 public AbstractDOMCachingXMLObject,
2784 public AbstractXMLObjectMarshaller,
2785 public AbstractXMLObjectUnmarshaller
2789 m_LangPrefix=nullptr;
2800 virtual ~LogoImpl() {
2801 XMLString::release(&m_Lang);
2802 XMLString::release(&m_LangPrefix);
2803 XMLString::release(&m_Height);
2804 XMLString::release(&m_Width);
2807 LogoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2808 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2812 LogoImpl(const LogoImpl& src)
2813 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2815 setLang(src.getLang());
2816 if (src.m_LangPrefix)
2817 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
2818 setHeight(src.m_Height);
2819 setWidth(src.m_Width);
2822 IMPL_XMLOBJECT_CLONE(Logo);
2823 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2824 IMPL_INTEGER_ATTRIB(Height);
2825 IMPL_INTEGER_ATTRIB(Width);
2828 void marshallAttributes(DOMElement* domElement) const {
2829 if (m_Lang && *m_Lang) {
2830 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2831 if (m_LangPrefix && *m_LangPrefix)
2832 attr->setPrefix(m_LangPrefix);
2834 attr->setPrefix(xmlconstants::XML_PREFIX);
2835 attr->setNodeValue(m_Lang);
2836 domElement->setAttributeNodeNS(attr);
2838 MARSHALL_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2839 MARSHALL_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2842 void processAttribute(const DOMAttr* attribute) {
2843 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2844 setLang(attribute->getValue());
2845 const XMLCh* temp = attribute->getPrefix();
2846 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2847 m_LangPrefix = XMLString::replicate(temp);
2850 PROC_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2851 PROC_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2852 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2856 class SAML_DLLLOCAL UIInfoImpl : public virtual UIInfo,
2857 public AbstractComplexElement,
2858 public AbstractDOMCachingXMLObject,
2859 public AbstractXMLObjectMarshaller,
2860 public AbstractXMLObjectUnmarshaller
2863 virtual ~UIInfoImpl() {}
2865 UIInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2866 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2869 UIInfoImpl(const UIInfoImpl& src)
2870 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2871 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2873 DisplayName* dn=dynamic_cast<DisplayName*>(*i);
2875 getDisplayNames().push_back(dn->cloneDisplayName());
2879 Description* des=dynamic_cast<Description*>(*i);
2881 getDescriptions().push_back(des->cloneDescription());
2885 Keywords* key=dynamic_cast<Keywords*>(*i);
2887 getKeywordss().push_back(key->cloneKeywords());
2891 Logo* logo=dynamic_cast<Logo*>(*i);
2893 getLogos().push_back(logo->cloneLogo());
2897 InformationURL* inf=dynamic_cast<InformationURL*>(*i);
2899 getInformationURLs().push_back(inf->cloneInformationURL());
2903 PrivacyStatementURL* priv=dynamic_cast<PrivacyStatementURL*>(*i);
2905 getPrivacyStatementURLs().push_back(priv->clonePrivacyStatementURL());
2909 getUnknownXMLObjects().push_back((*i)->clone());
2914 IMPL_XMLOBJECT_CLONE(UIInfo);
2915 IMPL_TYPED_CHILDREN(DisplayName,m_children.end());
2916 IMPL_TYPED_CHILDREN(Description,m_children.end());
2917 IMPL_TYPED_CHILDREN(Keywords,m_children.end());
2918 IMPL_TYPED_CHILDREN(Logo,m_children.end());
2919 IMPL_TYPED_CHILDREN(InformationURL,m_children.end());
2920 IMPL_TYPED_CHILDREN(PrivacyStatementURL,m_children.end());
2921 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2924 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2925 PROC_TYPED_CHILDREN(DisplayName,SAML20MD_UI_NS,false);
2926 PROC_TYPED_CHILDREN(Description,SAML20MD_UI_NS,false);
2927 PROC_TYPED_CHILDREN(Keywords,SAML20MD_UI_NS,false);
2928 PROC_TYPED_CHILDREN(Logo,SAML20MD_UI_NS,false);
2929 PROC_TYPED_CHILDREN(InformationURL,SAML20MD_UI_NS,false);
2930 PROC_TYPED_CHILDREN(PrivacyStatementURL,SAML20MD_UI_NS,false);
2933 const XMLCh* nsURI=root->getNamespaceURI();
2934 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2935 getUnknownXMLObjects().push_back(childXMLObject);
2939 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2943 class SAML_DLLLOCAL DiscoHintsImpl : public virtual DiscoHints,
2944 public AbstractComplexElement,
2945 public AbstractDOMCachingXMLObject,
2946 public AbstractXMLObjectMarshaller,
2947 public AbstractXMLObjectUnmarshaller
2950 virtual ~DiscoHintsImpl() {}
2952 DiscoHintsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2953 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2956 DiscoHintsImpl(const DiscoHintsImpl& src)
2957 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2958 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2960 IPHint* ip=dynamic_cast<IPHint*>(*i);
2962 getIPHints().push_back(ip->cloneIPHint());
2966 DomainHint* dom=dynamic_cast<DomainHint*>(*i);
2968 getDomainHints().push_back(dom->cloneDomainHint());
2972 GeolocationHint* geo=dynamic_cast<GeolocationHint*>(*i);
2974 getGeolocationHints().push_back(geo->cloneGeolocationHint());
2978 getUnknownXMLObjects().push_back((*i)->clone());
2983 IMPL_XMLOBJECT_CLONE(DiscoHints);
2984 IMPL_TYPED_CHILDREN(IPHint,m_children.end());
2985 IMPL_TYPED_CHILDREN(DomainHint,m_children.end());
2986 IMPL_TYPED_CHILDREN(GeolocationHint,m_children.end());
2987 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2990 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2991 PROC_TYPED_CHILDREN(IPHint,SAML20MD_UI_NS,false);
2992 PROC_TYPED_CHILDREN(DomainHint,SAML20MD_UI_NS,false);
2993 PROC_TYPED_CHILDREN(GeolocationHint,SAML20MD_UI_NS,false);
2996 const XMLCh* nsURI=root->getNamespaceURI();
2997 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2998 getUnknownXMLObjects().push_back(childXMLObject);
3002 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
3009 #if defined (_MSC_VER)
3010 #pragma warning( pop )
3013 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
3014 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
3015 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
3016 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
3017 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
3018 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
3019 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
3020 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
3022 // Builder Implementations
3024 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
3025 IMPL_XMLOBJECTBUILDER(AffiliateMember);
3026 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
3027 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
3028 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
3029 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
3030 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
3031 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
3032 IMPL_XMLOBJECTBUILDER(AttributeProfile);
3033 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
3034 IMPL_XMLOBJECTBUILDER(AttributeService);
3035 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
3036 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
3037 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
3038 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
3039 IMPL_XMLOBJECTBUILDER(AuthzService);
3040 IMPL_XMLOBJECTBUILDER(Company);
3041 IMPL_XMLOBJECTBUILDER(ContactPerson);
3042 IMPL_XMLOBJECTBUILDER(EmailAddress);
3043 IMPL_XMLOBJECTBUILDER(EndpointType);
3044 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
3045 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
3046 IMPL_XMLOBJECTBUILDER(Extensions);
3047 IMPL_XMLOBJECTBUILDER(GivenName);
3048 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
3049 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
3050 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
3051 IMPL_XMLOBJECTBUILDER(localizedNameType);
3052 IMPL_XMLOBJECTBUILDER(localizedURIType);
3053 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
3054 IMPL_XMLOBJECTBUILDER(NameIDFormat);
3055 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
3056 IMPL_XMLOBJECTBUILDER(Organization);
3057 IMPL_XMLOBJECTBUILDER(OrganizationName);
3058 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
3059 IMPL_XMLOBJECTBUILDER(OrganizationURL);
3060 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
3061 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
3062 IMPL_XMLOBJECTBUILDER(ServiceDescription);
3063 IMPL_XMLOBJECTBUILDER(ServiceName);
3064 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
3065 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
3066 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
3067 IMPL_XMLOBJECTBUILDER(SurName);
3068 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
3070 IMPL_XMLOBJECTBUILDER(ActionNamespace);
3071 IMPL_XMLOBJECTBUILDER(SourceID);
3072 IMPL_XMLOBJECTBUILDER(DiscoveryResponse);
3073 IMPL_XMLOBJECTBUILDER(RequestInitiator);
3074 IMPL_XMLOBJECTBUILDER(EntityAttributes);
3075 IMPL_XMLOBJECTBUILDER(DigestMethod);
3076 IMPL_XMLOBJECTBUILDER(SigningMethod);
3077 IMPL_XMLOBJECTBUILDER(DisplayName);
3078 IMPL_XMLOBJECTBUILDER(Description);
3079 IMPL_XMLOBJECTBUILDER(Keywords);
3080 IMPL_XMLOBJECTBUILDER(Logo);
3081 IMPL_XMLOBJECTBUILDER(InformationURL);
3082 IMPL_XMLOBJECTBUILDER(PrivacyStatementURL);
3083 IMPL_XMLOBJECTBUILDER(UIInfo);
3084 IMPL_XMLOBJECTBUILDER(IPHint);
3085 IMPL_XMLOBJECTBUILDER(DomainHint);
3086 IMPL_XMLOBJECTBUILDER(GeolocationHint);
3087 IMPL_XMLOBJECTBUILDER(DiscoHints);
3089 #ifdef HAVE_COVARIANT_RETURNS
3090 RoleDescriptor* RoleDescriptorBuilder::buildObject(
3092 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
3094 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
3097 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
3100 const DigestMethod* RoleDescriptor::getDigestMethod() const
3102 bool roleLevel = false;
3103 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3105 if (getExtensions()) {
3106 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3107 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3108 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3110 if (dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3118 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3119 if (entity && entity->getExtensions()) {
3120 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3121 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3122 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3123 if (dm && dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3132 pair<const SigningMethod*,const Credential*> RoleDescriptor::getSigningMethod(const CredentialResolver& resolver, CredentialCriteria& cc) const
3134 bool roleLevel = false;
3135 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3137 if (getExtensions()) {
3138 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3139 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3140 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3143 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3144 cc.setXMLAlgorithm(sm->getAlgorithm());
3145 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3146 if (minsize.first || maxsize.first) {
3147 cc.setKeySize(minsize.first ? minsize.second : 0);
3148 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3152 cc.setMaxKeySize(0);
3154 const Credential* cred = resolver.resolve(&cc);
3156 return make_pair(sm, cred);
3163 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3164 if (entity && entity->getExtensions()) {
3165 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3166 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3167 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3169 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3170 cc.setXMLAlgorithm(sm->getAlgorithm());
3171 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3172 if (minsize.first || maxsize.first) {
3173 cc.setKeySize(minsize.first ? minsize.second : 0);
3174 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3178 cc.setMaxKeySize(0);
3180 const Credential* cred = resolver.resolve(&cc);
3182 return make_pair(sm, cred);
3190 cc.setMaxKeySize(0);
3191 cc.setXMLAlgorithm(nullptr);
3192 return pair<const SigningMethod*,const Credential*>(nullptr, resolver.resolve(&cc));
3195 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
3196 const XMLCh AdditionalMetadataLocation::LOCAL_NAME[] = UNICODE_LITERAL_26(A,d,d,i,t,i,o,n,a,l,M,e,t,a,d,a,t,a,L,o,c,a,t,i,o,n);
3197 const XMLCh AdditionalMetadataLocation::TYPE_NAME[] = UNICODE_LITERAL_30(A,d,d,i,t,i,o,n,a,l,M,e,t,a,d,a,t,a,L,o,c,a,t,i,o,n,T,y,p,e);
3198 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
3199 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
3200 const XMLCh AffiliationDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_21(A,f,f,i,l,i,a,t,i,o,n,D,e,s,c,r,i,p,t,o,r);
3201 const XMLCh AffiliationDescriptor::TYPE_NAME[] = UNICODE_LITERAL_25(A,f,f,i,l,i,a,t,i,o,n,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3202 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3203 const XMLCh AffiliationDescriptor::AFFILIATIONOWNERID_ATTRIB_NAME[] = UNICODE_LITERAL_18(a,f,f,i,l,i,a,t,i,o,n,O,w,n,e,r,I,D);
3204 const XMLCh ArtifactResolutionService::LOCAL_NAME[] = UNICODE_LITERAL_25(A,r,t,i,f,a,c,t,R,e,s,o,l,u,t,i,o,n,S,e,r,v,i,c,e);
3205 const XMLCh AssertionConsumerService::LOCAL_NAME[] = UNICODE_LITERAL_24(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e);
3206 const XMLCh AssertionIDRequestService::LOCAL_NAME[] = UNICODE_LITERAL_25(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t,S,e,r,v,i,c,e);
3207 const XMLCh AttributeAuthorityDescriptor::LOCAL_NAME[] =UNICODE_LITERAL_28(A,t,t,r,i,b,u,t,e,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r);
3208 const XMLCh AttributeAuthorityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_32(A,t,t,r,i,b,u,t,e,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3209 const XMLCh AttributeConsumingService::LOCAL_NAME[] = UNICODE_LITERAL_25(A,t,t,r,i,b,u,t,e,C,o,n,s,u,m,i,n,g,S,e,r,v,i,c,e);
3210 const XMLCh AttributeConsumingService::TYPE_NAME[] = UNICODE_LITERAL_29(A,t,t,r,i,b,u,t,e,C,o,n,s,u,m,i,n,g,S,e,r,v,i,c,e,T,y,p,e);
3211 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3212 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3213 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
3214 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3215 const XMLCh AttributeQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_28(A,t,t,r,i,b,u,t,e,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3216 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
3217 const XMLCh AuthnAuthorityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_24(A,u,t,h,n,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r);
3218 const XMLCh AuthnAuthorityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_28(A,u,t,h,n,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3219 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3220 const XMLCh AuthnQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_24(A,u,t,h,n,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3221 const XMLCh AuthnQueryService::LOCAL_NAME[] = UNICODE_LITERAL_17(A,u,t,h,n,Q,u,e,r,y,S,e,r,v,i,c,e);
3222 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3223 const XMLCh AuthzDecisionQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_32(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3224 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
3225 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
3226 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
3227 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
3228 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
3229 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
3230 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
3231 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
3232 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
3233 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
3234 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
3235 const XMLCh Description::LOCAL_NAME[] = UNICODE_LITERAL_11(D,e,s,c,r,i,p,t,i,o,n);
3236 const XMLCh DigestMethod::LOCAL_NAME[] = UNICODE_LITERAL_12(D,i,g,e,s,t,M,e,t,h,o,d);
3237 const XMLCh DigestMethod::TYPE_NAME[] = UNICODE_LITERAL_16(D,i,g,e,s,t,M,e,t,h,o,d,T,y,p,e);
3238 const XMLCh DigestMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3239 const XMLCh DiscoHints::LOCAL_NAME[] = UNICODE_LITERAL_10(D,i,s,c,o,H,i,n,t,s);
3240 const XMLCh DiscoHints::TYPE_NAME[] = UNICODE_LITERAL_14(D,i,s,c,o,H,i,n,t,s,T,y,p,e);
3241 const XMLCh DiscoveryResponse::LOCAL_NAME[] = UNICODE_LITERAL_17(D,i,s,c,o,v,e,r,y,R,e,s,p,o,n,s,e);
3242 const XMLCh DisplayName::LOCAL_NAME[] = UNICODE_LITERAL_11(D,i,s,p,l,a,y,N,a,m,e);
3243 const XMLCh DomainHint::LOCAL_NAME[] = UNICODE_LITERAL_10(D,o,m,a,i,n,H,i,n,t);
3244 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
3245 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
3246 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
3247 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
3248 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
3249 const XMLCh EndpointType::RESPONSELOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_16(R,e,s,p,o,n,s,e,L,o,c,a,t,i,o,n);
3250 const XMLCh EntitiesDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,t,i,t,i,e,s,D,e,s,c,r,i,p,t,o,r);
3251 const XMLCh EntitiesDescriptor::TYPE_NAME[] = UNICODE_LITERAL_22(E,n,t,i,t,i,e,s,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3252 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3253 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
3254 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
3255 const XMLCh EntityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3256 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3257 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
3258 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
3259 const XMLCh EntityAttributes::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s,T,y,p,e);
3260 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
3261 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
3262 const XMLCh GeolocationHint::LOCAL_NAME[] = UNICODE_LITERAL_15(G,e,o,l,o,c,a,t,i,o,n,H,i,n,t);
3263 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
3264 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3265 const XMLCh IDPSSODescriptor::TYPE_NAME[] = UNICODE_LITERAL_20(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3266 const XMLCh IDPSSODescriptor::WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_23(W,a,n,t,A,u,t,h,n,R,e,q,u,e,s,t,s,S,i,g,n,e,d);
3267 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
3268 const XMLCh IndexedEndpointType::TYPE_NAME[] = UNICODE_LITERAL_19(I,n,d,e,x,e,d,E,n,d,p,o,i,n,t,T,y,p,e);
3269 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3270 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3271 const XMLCh InformationURL::LOCAL_NAME[] = UNICODE_LITERAL_14(I,n,f,o,r,m,a,t,i,o,n,U,R,L);
3272 const XMLCh IPHint::LOCAL_NAME[] = UNICODE_LITERAL_6(I,P,H,i,n,t);
3273 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
3274 const XMLCh KeyDescriptor::TYPE_NAME[] = UNICODE_LITERAL_17(K,e,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3275 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
3276 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
3277 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
3278 const XMLCh Keywords::LOCAL_NAME[] = UNICODE_LITERAL_8(K,e,y,w,o,r,d,s);
3279 const XMLCh Keywords::TYPE_NAME[] = UNICODE_LITERAL_12(K,e,y,w,o,r,d,s,T,y,p,e);
3280 const XMLCh Keywords::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3281 const XMLCh Logo::LOCAL_NAME[] = UNICODE_LITERAL_4(L,o,g,o);
3282 const XMLCh Logo::TYPE_NAME[] = UNICODE_LITERAL_8(L,o,g,o,T,y,p,e);
3283 const XMLCh Logo::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3284 const XMLCh Logo::HEIGHT_ATTRIB_NAME[] = UNICODE_LITERAL_6(h,e,i,g,h,t);
3285 const XMLCh Logo::WIDTH_ATTRIB_NAME[] = UNICODE_LITERAL_5(w,i,d,t,h);
3286 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
3287 const XMLCh localizedNameType::TYPE_NAME[] = UNICODE_LITERAL_17(l,o,c,a,l,i,z,e,d,N,a,m,e,T,y,p,e);
3288 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3289 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
3290 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
3291 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3292 const XMLCh ManageNameIDService::LOCAL_NAME[] = UNICODE_LITERAL_19(M,a,n,a,g,e,N,a,m,e,I,D,S,e,r,v,i,c,e);
3293 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
3294 const XMLCh NameIDMappingService::LOCAL_NAME[] = UNICODE_LITERAL_20(N,a,m,e,I,D,M,a,p,p,i,n,g,S,e,r,v,i,c,e);
3295 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
3296 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
3297 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
3298 const XMLCh OrganizationDisplayName::LOCAL_NAME[] = UNICODE_LITERAL_23(O,r,g,a,n,i,z,a,t,i,o,n,D,i,s,p,l,a,y,N,a,m,e);
3299 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
3300 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
3301 const XMLCh PDPDescriptor::TYPE_NAME[] = UNICODE_LITERAL_17(P,D,P,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3302 const XMLCh PrivacyStatementURL::LOCAL_NAME[] = UNICODE_LITERAL_19(P,r,i,v,a,c,y,S,t,a,t,e,m,e,n,t,U,R,L);
3303 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
3304 const XMLCh QueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_19(Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3305 const XMLCh QueryDescriptorType::WANTASSERTIONSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_20(W,a,n,t,A,s,s,e,r,t,i,o,n,s,S,i,g,n,e,d);
3306 const XMLCh RequestedAttribute::LOCAL_NAME[] = UNICODE_LITERAL_18(R,e,q,u,e,s,t,e,d,A,t,t,r,i,b,u,t,e);
3307 const XMLCh RequestedAttribute::TYPE_NAME[] = UNICODE_LITERAL_22(R,e,q,u,e,s,t,e,d,A,t,t,r,i,b,u,t,e,T,y,p,e);
3308 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
3309 const XMLCh RequestInitiator::LOCAL_NAME[] = UNICODE_LITERAL_16(R,e,q,u,e,s,t,I,n,i,t,i,a,t,o,r);
3310 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3311 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3312 const XMLCh RoleDescriptor::PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME[] = UNICODE_LITERAL_26(p,r,o,t,o,c,o,l,S,u,p,p,o,r,t,E,n,u,m,e,r,a,t,i,o,n);
3313 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
3314 const XMLCh ServiceDescription::LOCAL_NAME[] = UNICODE_LITERAL_18(S,e,r,v,i,c,e,D,e,s,c,r,i,p,t,i,o,n);
3315 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
3316 const XMLCh SigningMethod::LOCAL_NAME[] = UNICODE_LITERAL_13(S,i,g,n,i,n,g,M,e,t,h,o,d);
3317 const XMLCh SigningMethod::TYPE_NAME[] = UNICODE_LITERAL_17(S,i,g,n,i,n,g,M,e,t,h,o,d,T,y,p,e);
3318 const XMLCh SigningMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3319 const XMLCh SigningMethod::MINKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,i,n,K,e,y,S,i,z,e);
3320 const XMLCh SigningMethod::MAXKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,a,x,K,e,y,S,i,z,e);
3321 const XMLCh SingleLogoutService::LOCAL_NAME[] = UNICODE_LITERAL_19(S,i,n,g,l,e,L,o,g,o,u,t,S,e,r,v,i,c,e);
3322 const XMLCh SingleSignOnService::LOCAL_NAME[] = UNICODE_LITERAL_19(S,i,n,g,l,e,S,i,g,n,O,n,S,e,r,v,i,c,e);
3323 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
3324 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3325 const XMLCh SPSSODescriptor::TYPE_NAME[] = UNICODE_LITERAL_19(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3326 const XMLCh SPSSODescriptor::AUTHNREQUESTSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_19(A,u,t,h,n,R,e,q,u,e,s,t,s,S,i,g,n,e,d);
3327 const XMLCh SPSSODescriptor::WANTASSERTIONSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_20(W,a,n,t,A,s,s,e,r,t,i,o,n,s,S,i,g,n,e,d);
3328 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
3329 const XMLCh SSODescriptorType::TYPE_NAME[] = UNICODE_LITERAL_17(S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
3330 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
3331 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
3332 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
3333 const XMLCh UIInfo::LOCAL_NAME[] = UNICODE_LITERAL_6(U,I,I,n,f,o);
3334 const XMLCh UIInfo::TYPE_NAME[] = UNICODE_LITERAL_10(U,I,I,n,f,o,T,y,p,e);