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) {
115 void _clone(const localizedNameTypeImpl& src) {
116 setLang(src.getLang());
117 if (src.m_LangPrefix)
118 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
121 IMPL_XMLOBJECT_CLONE_EX(localizedNameType);
122 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
125 void marshallAttributes(DOMElement* domElement) const {
126 if (m_Lang && *m_Lang) {
127 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
128 if (m_LangPrefix && *m_LangPrefix)
129 attr->setPrefix(m_LangPrefix);
131 attr->setPrefix(xmlconstants::XML_PREFIX);
132 attr->setNodeValue(m_Lang);
133 domElement->setAttributeNodeNS(attr);
137 void processAttribute(const DOMAttr* attribute) {
138 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
139 setLang(attribute->getValue());
140 const XMLCh* temp = attribute->getPrefix();
141 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
142 m_LangPrefix = XMLString::replicate(temp);
145 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
149 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
150 public AbstractSimpleElement,
151 public AbstractDOMCachingXMLObject,
152 public AbstractXMLObjectMarshaller,
153 public AbstractXMLObjectUnmarshaller
157 m_LangPrefix=nullptr;
161 localizedURITypeImpl() {
166 virtual ~localizedURITypeImpl() {
167 XMLString::release(&m_Lang);
168 XMLString::release(&m_LangPrefix);
171 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
172 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
176 localizedURITypeImpl(const localizedURITypeImpl& src)
177 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
181 void _clone(const localizedURITypeImpl& src) {
182 setLang(src.getLang());
183 if (src.m_LangPrefix)
184 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
187 IMPL_XMLOBJECT_CLONE_EX(localizedURIType);
188 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
191 void marshallAttributes(DOMElement* domElement) const {
192 if (m_Lang && *m_Lang) {
193 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
194 if (m_LangPrefix && *m_LangPrefix)
195 attr->setPrefix(m_LangPrefix);
197 attr->setPrefix(xmlconstants::XML_PREFIX);
198 attr->setNodeValue(m_Lang);
199 domElement->setAttributeNodeNS(attr);
203 void processAttribute(const DOMAttr* attribute) {
204 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
205 setLang(attribute->getValue());
206 const XMLCh* temp = attribute->getPrefix();
207 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
208 m_LangPrefix = XMLString::replicate(temp);
211 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
215 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
218 virtual ~OrganizationNameImpl() {}
220 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
221 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
223 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
225 IMPL_XMLOBJECT_CLONE_EX(OrganizationName);
228 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
231 virtual ~OrganizationDisplayNameImpl() {}
233 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
234 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
236 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
238 IMPL_XMLOBJECT_CLONE_EX(OrganizationDisplayName);
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_EX(OrganizationURL);
254 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
257 virtual ~ServiceNameImpl() {}
259 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
260 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
262 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
264 IMPL_XMLOBJECT_CLONE_EX(ServiceName);
267 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
270 virtual ~ServiceDescriptionImpl() {}
272 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
273 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
275 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
277 IMPL_XMLOBJECT_CLONE_EX(ServiceDescription);
280 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
281 public AbstractComplexElement,
282 public AbstractDOMCachingXMLObject,
283 public AbstractXMLObjectMarshaller,
284 public AbstractXMLObjectUnmarshaller
287 virtual ~ExtensionsImpl() {}
289 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
290 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
293 ExtensionsImpl(const ExtensionsImpl& src)
294 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
295 VectorOf(XMLObject) v=getUnknownXMLObjects();
296 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
297 v.push_back((*i)->clone());
300 IMPL_XMLOBJECT_CLONE(Extensions);
301 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
304 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
306 const XMLCh* nsURI=root->getNamespaceURI();
307 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
308 getUnknownXMLObjects().push_back(childXMLObject);
312 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
316 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
317 public AbstractComplexElement,
318 public AbstractAttributeExtensibleXMLObject,
319 public AbstractDOMCachingXMLObject,
320 public AbstractXMLObjectMarshaller,
321 public AbstractXMLObjectUnmarshaller
323 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
324 list<XMLObject*>::iterator m_pos_OrganizationURL;
327 m_children.push_back(nullptr);
328 m_children.push_back(nullptr);
329 m_children.push_back(nullptr);
330 m_Extensions=nullptr;
331 m_pos_Extensions=m_children.begin();
332 m_pos_OrganizationDisplayName=m_pos_Extensions;
333 ++m_pos_OrganizationDisplayName;
334 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
335 ++m_pos_OrganizationURL;
338 virtual ~OrganizationImpl() {}
340 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
341 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
345 OrganizationImpl(const OrganizationImpl& src)
346 : AbstractXMLObject(src), AbstractComplexElement(src),
347 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
349 if (src.getExtensions())
350 setExtensions(src.getExtensions()->cloneExtensions());
351 VectorOf(OrganizationName) v=getOrganizationNames();
352 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
354 v.push_back((*i)->cloneOrganizationName());
357 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
358 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
360 w.push_back((*j)->cloneOrganizationDisplayName());
363 VectorOf(OrganizationURL) x=getOrganizationURLs();
364 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
366 x.push_back((*k)->cloneOrganizationURL());
371 IMPL_XMLOBJECT_CLONE(Organization);
372 IMPL_TYPED_CHILD(Extensions);
373 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
374 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
375 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
378 void marshallAttributes(DOMElement* domElement) const {
379 marshallExtensionAttributes(domElement);
382 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
383 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
384 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
385 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
386 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
387 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
390 void processAttribute(const DOMAttr* attribute) {
391 unmarshallExtensionAttribute(attribute);
395 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
396 public AbstractComplexElement,
397 public AbstractAttributeExtensibleXMLObject,
398 public AbstractDOMCachingXMLObject,
399 public AbstractXMLObjectMarshaller,
400 public AbstractXMLObjectUnmarshaller
402 list<XMLObject*>::iterator m_pos_TelephoneNumber;
405 m_ContactType=nullptr;
406 m_children.push_back(nullptr);
407 m_children.push_back(nullptr);
408 m_children.push_back(nullptr);
409 m_children.push_back(nullptr);
410 m_children.push_back(nullptr);
411 m_Extensions=nullptr;
415 m_pos_Extensions=m_children.begin();
416 m_pos_Company=m_pos_Extensions;
418 m_pos_GivenName=m_pos_Company;
420 m_pos_SurName=m_pos_GivenName;
422 m_pos_TelephoneNumber=m_pos_SurName;
423 ++m_pos_TelephoneNumber;
426 virtual ~ContactPersonImpl() {
427 XMLString::release(&m_ContactType);
430 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
431 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
435 ContactPersonImpl(const ContactPersonImpl& src)
436 : AbstractXMLObject(src), AbstractComplexElement(src),
437 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
439 if (src.getExtensions())
440 setExtensions(src.getExtensions()->cloneExtensions());
441 if (src.getCompany())
442 setCompany(src.getCompany()->cloneCompany());
443 if (src.getGivenName())
444 setGivenName(src.getGivenName()->cloneGivenName());
445 if (src.getSurName())
446 setSurName(src.getSurName()->cloneSurName());
448 VectorOf(EmailAddress) v=getEmailAddresss();
449 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
451 v.push_back((*i)->cloneEmailAddress());
454 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
455 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
457 w.push_back((*j)->cloneTelephoneNumber());
462 IMPL_XMLOBJECT_CLONE(ContactPerson);
463 IMPL_STRING_ATTRIB(ContactType);
464 IMPL_TYPED_CHILD(Extensions);
465 IMPL_TYPED_CHILD(Company);
466 IMPL_TYPED_CHILD(GivenName);
467 IMPL_TYPED_CHILD(SurName);
468 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
469 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
471 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
472 if (!qualifiedName.hasNamespaceURI()) {
473 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
474 setContactType(value);
478 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
482 void marshallAttributes(DOMElement* domElement) const {
483 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
484 marshallExtensionAttributes(domElement);
487 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
488 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
489 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
490 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
491 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
492 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
493 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
494 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
497 void processAttribute(const DOMAttr* attribute) {
498 unmarshallExtensionAttribute(attribute);
502 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
503 public AbstractSimpleElement,
504 public AbstractDOMCachingXMLObject,
505 public AbstractXMLObjectMarshaller,
506 public AbstractXMLObjectUnmarshaller
513 virtual ~AdditionalMetadataLocationImpl() {
514 XMLString::release(&m_Namespace);
517 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
518 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
522 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
523 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
527 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
528 IMPL_STRING_ATTRIB(Namespace);
531 void marshallAttributes(DOMElement* domElement) const {
532 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
535 void processAttribute(const DOMAttr* attribute) {
536 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
537 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
541 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
542 public AbstractComplexElement,
543 public AbstractDOMCachingXMLObject,
544 public AbstractXMLObjectMarshaller,
545 public AbstractXMLObjectUnmarshaller
550 m_children.push_back(nullptr);
551 m_pos_KeyInfo=m_children.begin();
554 virtual ~KeyDescriptorImpl() {
555 XMLString::release(&m_Use);
558 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
559 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
563 KeyDescriptorImpl(const KeyDescriptorImpl& src)
564 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
566 setUse(src.getUse());
567 if (src.getKeyInfo())
568 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
569 VectorOf(EncryptionMethod) v=getEncryptionMethods();
570 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
572 v.push_back((*i)->cloneEncryptionMethod());
577 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
578 IMPL_STRING_ATTRIB(Use);
579 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
580 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
583 void marshallAttributes(DOMElement* domElement) const {
584 MARSHALL_STRING_ATTRIB(Use,USE,nullptr);
587 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
588 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
589 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
590 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
593 void processAttribute(const DOMAttr* attribute) {
594 PROC_STRING_ATTRIB(Use,USE,nullptr);
595 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
599 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
600 public AbstractAttributeExtensibleXMLObject,
601 public AbstractComplexElement,
602 public AbstractDOMCachingXMLObject,
603 public AbstractXMLObjectMarshaller,
604 public AbstractXMLObjectUnmarshaller
607 m_Binding=m_Location=m_ResponseLocation=nullptr;
616 virtual ~EndpointTypeImpl() {
617 XMLString::release(&m_Binding);
618 XMLString::release(&m_Location);
619 XMLString::release(&m_ResponseLocation);
622 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
623 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
627 EndpointTypeImpl(const EndpointTypeImpl& src)
628 : AbstractXMLObject(src),
629 AbstractAttributeExtensibleXMLObject(src),
630 AbstractComplexElement(src),
631 AbstractDOMCachingXMLObject(src) {
635 void _clone(const EndpointTypeImpl& src) {
636 setBinding(src.getBinding());
637 setLocation(src.getLocation());
638 setResponseLocation(src.getResponseLocation());
639 VectorOf(XMLObject) v=getUnknownXMLObjects();
640 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
641 v.push_back((*i)->clone());
644 IMPL_XMLOBJECT_CLONE_EX(EndpointType);
645 IMPL_STRING_ATTRIB(Binding);
646 IMPL_STRING_ATTRIB(Location);
647 IMPL_STRING_ATTRIB(ResponseLocation);
648 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
650 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
651 if (!qualifiedName.hasNamespaceURI()) {
652 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
656 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
660 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
661 setResponseLocation(value);
665 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
668 void marshallAttributes(DOMElement* domElement) const {
669 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
670 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
671 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
672 marshallExtensionAttributes(domElement);
675 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
677 const XMLCh* nsURI=root->getNamespaceURI();
678 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
679 getUnknownXMLObjects().push_back(childXMLObject);
682 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
685 void processAttribute(const DOMAttr* attribute) {
686 unmarshallExtensionAttribute(attribute);
690 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
694 m_isDefault=XML_BOOL_NULL;
698 IndexedEndpointTypeImpl() {
702 virtual ~IndexedEndpointTypeImpl() {
703 XMLString::release(&m_Index);
706 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
707 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
711 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
715 void _clone(const IndexedEndpointTypeImpl& src) {
716 EndpointTypeImpl::_clone(src);
717 setIndex(src.m_Index);
718 isDefault(src.m_isDefault);
721 IMPL_XMLOBJECT_CLONE_EX(IndexedEndpointType);
722 IMPL_INTEGER_ATTRIB(Index);
723 IMPL_BOOLEAN_ATTRIB(isDefault);
725 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
726 if (!qualifiedName.hasNamespaceURI()) {
727 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
731 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
736 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
740 void marshallAttributes(DOMElement* domElement) const {
741 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
742 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
743 EndpointTypeImpl::marshallAttributes(domElement);
747 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
750 virtual ~ArtifactResolutionServiceImpl() {}
752 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
753 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
755 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
757 IMPL_XMLOBJECT_CLONE_EX(ArtifactResolutionService);
760 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
763 virtual ~SingleLogoutServiceImpl() {}
765 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
766 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
768 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
770 IMPL_XMLOBJECT_CLONE_EX(SingleLogoutService);
773 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
776 virtual ~ManageNameIDServiceImpl() {}
778 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
779 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
781 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
783 IMPL_XMLOBJECT_CLONE_EX(ManageNameIDService);
786 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
789 virtual ~SingleSignOnServiceImpl() {}
791 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
792 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
794 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
796 IMPL_XMLOBJECT_CLONE_EX(SingleSignOnService);
799 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
802 virtual ~NameIDMappingServiceImpl() {}
804 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
805 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
807 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
809 IMPL_XMLOBJECT_CLONE_EX(NameIDMappingService);
812 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
815 virtual ~AssertionIDRequestServiceImpl() {}
817 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
818 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
820 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
822 IMPL_XMLOBJECT_CLONE_EX(AssertionIDRequestService);
825 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
828 virtual ~AssertionConsumerServiceImpl() {}
830 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
831 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
833 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
835 IMPL_XMLOBJECT_CLONE_EX(AssertionConsumerService);
838 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
841 virtual ~AuthnQueryServiceImpl() {}
843 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
844 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
846 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
848 IMPL_XMLOBJECT_CLONE_EX(AuthnQueryService);
851 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
854 virtual ~AuthzServiceImpl() {}
856 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
857 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
859 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
861 IMPL_XMLOBJECT_CLONE_EX(AuthzService);
864 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
867 virtual ~AttributeServiceImpl() {}
869 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
870 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
872 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
874 IMPL_XMLOBJECT_CLONE_EX(AttributeService);
877 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
878 public virtual SignableObject,
879 public AbstractComplexElement,
880 public AbstractAttributeExtensibleXMLObject,
881 public AbstractDOMCachingXMLObject,
882 public AbstractXMLObjectMarshaller,
883 public AbstractXMLObjectUnmarshaller
886 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
887 m_ValidUntil=m_CacheDuration=nullptr;
888 m_children.push_back(nullptr);
889 m_children.push_back(nullptr);
890 m_children.push_back(nullptr);
891 m_children.push_back(nullptr);
893 m_Extensions=nullptr;
894 m_Organization=nullptr;
895 m_pos_Signature=m_children.begin();
896 m_pos_Extensions=m_pos_Signature;
898 m_pos_Organization=m_pos_Extensions;
899 ++m_pos_Organization;
900 m_pos_ContactPerson=m_pos_Organization;
901 ++m_pos_ContactPerson;
905 list<XMLObject*>::iterator m_pos_ContactPerson;
907 RoleDescriptorImpl() {
912 virtual ~RoleDescriptorImpl() {
913 XMLString::release(&m_ID);
914 XMLString::release(&m_ProtocolSupportEnumeration);
915 XMLString::release(&m_ErrorURL);
917 delete m_CacheDuration;
920 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
921 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
925 RoleDescriptorImpl(const RoleDescriptorImpl& src)
926 : AbstractXMLObject(src), AbstractComplexElement(src),
927 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
931 void _clone(const RoleDescriptorImpl& src) {
933 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
934 setErrorURL(src.getErrorURL());
935 setValidUntil(src.getValidUntil());
936 setCacheDuration(src.getCacheDuration());
937 if (src.getSignature())
938 setSignature(src.getSignature()->cloneSignature());
939 if (src.getExtensions())
940 setExtensions(src.getExtensions()->cloneExtensions());
941 if (src.getOrganization())
942 setOrganization(src.getOrganization()->cloneOrganization());
944 VectorOf(KeyDescriptor) v=getKeyDescriptors();
945 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
947 v.push_back((*i)->cloneKeyDescriptor());
950 VectorOf(ContactPerson) w=getContactPersons();
951 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
953 w.push_back((*j)->cloneContactPerson());
958 //IMPL_TYPED_CHILD(Signature);
959 // Need customized setter.
961 Signature* m_Signature;
962 list<XMLObject*>::iterator m_pos_Signature;
964 Signature* getSignature() const {
968 void setSignature(Signature* sig) {
969 prepareForAssignment(m_Signature,sig);
970 *m_pos_Signature=m_Signature=sig;
971 // Sync content reference back up.
973 m_Signature->setContentReference(new opensaml::ContentReference(*this));
976 RoleDescriptor* cloneRoleDescriptor() const {
977 return dynamic_cast<RoleDescriptor*>(clone());
980 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
981 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
982 IMPL_STRING_ATTRIB(ErrorURL);
983 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
984 IMPL_DURATION_ATTRIB(CacheDuration,0);
985 IMPL_TYPED_CHILD(Extensions);
986 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
987 IMPL_TYPED_CHILD(Organization);
988 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
990 bool hasSupport(const XMLCh* protocol) const {
991 if (!protocol || !*protocol)
993 if (m_ProtocolSupportEnumeration) {
994 // Look for first character.
995 xsecsize_t len=XMLString::stringLen(protocol);
997 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
999 // Only possible match is if it's the first character or a space comes before it.
1000 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1001 // See if rest of protocol string is present.
1002 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1003 // Only possible match is if it's the last character or a space comes after it.
1004 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1010 // Move past last search and start again.
1015 // Move past last search and start again.
1018 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1024 void addSupport(const XMLCh* protocol) {
1025 if (hasSupport(protocol))
1027 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1028 #ifdef HAVE_GOOD_STL
1029 xstring pse(m_ProtocolSupportEnumeration);
1030 pse = pse + chSpace + protocol;
1031 setProtocolSupportEnumeration(pse.c_str());
1033 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1034 auto_ptr_char temp2(protocol);
1035 string pse(temp.get());
1036 pse = pse + ' ' + temp2.get();
1037 auto_ptr_XMLCh temp3(pse.c_str());
1038 setProtocolSupportEnumeration(temp3.get());
1042 setProtocolSupportEnumeration(protocol);
1046 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1047 if (!qualifiedName.hasNamespaceURI()) {
1048 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1052 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1053 setProtocolSupportEnumeration(value);
1056 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1060 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1061 setValidUntil(value);
1064 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1065 setCacheDuration(value);
1069 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1073 void prepareForMarshalling() const {
1075 declareNonVisibleNamespaces();
1078 void marshallAttributes(DOMElement* domElement) const {
1079 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1080 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
1081 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
1082 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1083 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1084 marshallExtensionAttributes(domElement);
1087 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1088 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1089 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1090 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1091 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1092 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1093 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1096 void processAttribute(const DOMAttr* attribute) {
1097 PROC_ID_ATTRIB(ID,ID,nullptr);
1098 unmarshallExtensionAttribute(attribute);
1102 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1105 virtual ~RoleDescriptorTypeImpl() {}
1107 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1108 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1111 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1114 void _clone(const RoleDescriptorTypeImpl& src) {
1115 RoleDescriptorImpl::_clone(src);
1116 VectorOf(XMLObject) v=getUnknownXMLObjects();
1117 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1118 v.push_back((*i)->clone());
1121 IMPL_XMLOBJECT_CLONE_EX(RoleDescriptorType);
1122 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1125 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1126 getUnknownXMLObjects().push_back(childXMLObject);
1130 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1133 m_children.push_back(nullptr);
1134 m_children.push_back(nullptr);
1135 m_children.push_back(nullptr);
1136 m_children.push_back(nullptr);
1137 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1138 ++m_pos_ArtifactResolutionService;
1139 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1140 ++m_pos_SingleLogoutService;
1141 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1142 ++m_pos_ManageNameIDService;
1143 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1144 ++m_pos_NameIDFormat;
1148 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1149 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1150 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1151 list<XMLObject*>::iterator m_pos_NameIDFormat;
1153 SSODescriptorTypeImpl() {
1158 virtual ~SSODescriptorTypeImpl() {}
1160 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1161 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1165 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1169 void _clone(const SSODescriptorTypeImpl& src) {
1170 RoleDescriptorImpl::_clone(src);
1171 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1172 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1174 v.push_back((*i)->cloneArtifactResolutionService());
1177 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1178 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1180 w.push_back((*j)->cloneSingleLogoutService());
1183 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1184 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1186 x.push_back((*k)->cloneManageNameIDService());
1189 VectorOf(NameIDFormat) y=getNameIDFormats();
1190 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1192 y.push_back((*m)->cloneNameIDFormat());
1197 SSODescriptorType* cloneSSODescriptorType() const {
1198 return dynamic_cast<SSODescriptorType*>(clone());
1201 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1202 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1203 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1204 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1207 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1208 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1209 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1210 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1211 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1212 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1216 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1218 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1219 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1220 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1221 list<XMLObject*>::iterator m_pos_AttributeProfile;
1224 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1225 m_children.push_back(nullptr);
1226 m_children.push_back(nullptr);
1227 m_children.push_back(nullptr);
1228 m_children.push_back(nullptr);
1229 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1230 ++m_pos_SingleSignOnService;
1231 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1232 ++m_pos_NameIDMappingService;
1233 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1234 ++m_pos_AssertionIDRequestService;
1235 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1236 ++m_pos_AttributeProfile;
1240 virtual ~IDPSSODescriptorImpl() {}
1242 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1243 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1247 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1251 void _clone(const IDPSSODescriptorImpl& src) {
1252 SSODescriptorTypeImpl::_clone(src);
1253 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1254 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1255 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1257 v.push_back((*i)->cloneSingleSignOnService());
1260 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1261 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1263 w.push_back((*j)->cloneNameIDMappingService());
1266 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1267 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1269 x.push_back((*k)->cloneAssertionIDRequestService());
1272 VectorOf(AttributeProfile) y=getAttributeProfiles();
1273 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1275 y.push_back((*m)->cloneAttributeProfile());
1278 VectorOf(Attribute) z=getAttributes();
1279 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1281 z.push_back((*n)->cloneAttribute());
1286 IMPL_XMLOBJECT_CLONE_EX(IDPSSODescriptor);
1287 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1288 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1289 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1290 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1291 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1292 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1294 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1295 if (!qualifiedName.hasNamespaceURI()) {
1296 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1297 setWantAuthnRequestsSigned(value);
1301 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1305 void marshallAttributes(DOMElement* domElement) const {
1306 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1307 RoleDescriptorImpl::marshallAttributes(domElement);
1310 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1311 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1312 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1313 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1314 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1315 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1316 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1320 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1321 public AbstractComplexElement,
1322 public AbstractAttributeExtensibleXMLObject,
1323 public AbstractDOMCachingXMLObject,
1324 public AbstractXMLObjectMarshaller,
1325 public AbstractXMLObjectUnmarshaller
1328 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1329 m_isRequired=XML_BOOL_NULL;
1332 virtual ~RequestedAttributeImpl() {
1333 XMLString::release(&m_Name);
1334 XMLString::release(&m_NameFormat);
1335 XMLString::release(&m_FriendlyName);
1338 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1339 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1343 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1344 : AbstractXMLObject(src), AbstractComplexElement(src),
1345 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1347 setName(src.getName());
1348 setNameFormat(src.getNameFormat());
1349 setFriendlyName(src.getFriendlyName());
1350 isRequired(src.m_isRequired);
1351 VectorOf(XMLObject) v=getAttributeValues();
1352 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1354 v.push_back((*i)->clone());
1359 IMPL_XMLOBJECT_CLONE2(RequestedAttribute,Attribute);
1360 IMPL_STRING_ATTRIB(Name);
1361 IMPL_STRING_ATTRIB(NameFormat);
1362 IMPL_STRING_ATTRIB(FriendlyName);
1363 IMPL_BOOLEAN_ATTRIB(isRequired);
1364 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1366 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1367 if (!qualifiedName.hasNamespaceURI()) {
1368 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1372 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1373 setNameFormat(value);
1376 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1377 setFriendlyName(value);
1380 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1381 setisRequired(value);
1385 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1389 void marshallAttributes(DOMElement* domElement) const {
1390 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1391 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1392 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1393 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1394 marshallExtensionAttributes(domElement);
1397 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1398 getAttributeValues().push_back(childXMLObject);
1401 void processAttribute(const DOMAttr* attribute) {
1402 unmarshallExtensionAttribute(attribute);
1406 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1407 public AbstractComplexElement,
1408 public AbstractDOMCachingXMLObject,
1409 public AbstractXMLObjectMarshaller,
1410 public AbstractXMLObjectUnmarshaller
1412 list<XMLObject*>::iterator m_pos_ServiceDescription;
1413 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1417 m_isDefault=XML_BOOL_NULL;
1418 m_children.push_back(nullptr);
1419 m_children.push_back(nullptr);
1420 m_pos_ServiceDescription=m_children.begin();
1421 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1422 ++m_pos_RequestedAttribute;
1426 virtual ~AttributeConsumingServiceImpl() {
1427 XMLString::release(&m_Index);
1430 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1431 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1435 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1436 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1438 setIndex(src.m_Index);
1439 isDefault(src.m_isDefault);
1440 VectorOf(ServiceName) v=getServiceNames();
1441 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1443 v.push_back((*i)->cloneServiceName());
1446 VectorOf(ServiceDescription) w=getServiceDescriptions();
1447 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1449 w.push_back((*j)->cloneServiceDescription());
1452 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1453 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1455 x.push_back((*k)->cloneRequestedAttribute());
1460 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1461 IMPL_INTEGER_ATTRIB(Index);
1462 IMPL_BOOLEAN_ATTRIB(isDefault);
1463 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1464 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1465 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1468 void marshallAttributes(DOMElement* domElement) const {
1469 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1470 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1473 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1474 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1475 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1476 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1477 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1480 void processAttribute(const DOMAttr* attribute) {
1481 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1482 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1483 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1487 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1489 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1492 m_AuthnRequestsSigned=XML_BOOL_NULL;
1493 m_WantAssertionsSigned=XML_BOOL_NULL;
1494 m_children.push_back(nullptr);
1495 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1496 ++m_pos_AssertionConsumerService;
1500 virtual ~SPSSODescriptorImpl() {}
1502 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1503 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1507 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1511 void _clone(const SPSSODescriptorImpl& src) {
1512 SSODescriptorTypeImpl::_clone(src);
1513 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1514 WantAssertionsSigned(src.m_WantAssertionsSigned);
1515 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1516 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1518 v.push_back((*i)->cloneAssertionConsumerService());
1521 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1522 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1524 w.push_back((*j)->cloneAttributeConsumingService());
1529 IMPL_XMLOBJECT_CLONE_EX(SPSSODescriptor);
1530 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1531 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1532 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1533 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1535 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1536 if (!qualifiedName.hasNamespaceURI()) {
1537 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1538 setAuthnRequestsSigned(value);
1541 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1542 setWantAssertionsSigned(value);
1546 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1550 void marshallAttributes(DOMElement* domElement) const {
1551 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1552 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1553 RoleDescriptorImpl::marshallAttributes(domElement);
1556 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1557 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1558 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1559 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1563 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1565 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1566 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1569 m_children.push_back(nullptr);
1570 m_children.push_back(nullptr);
1571 m_pos_AuthnQueryService=m_pos_ContactPerson;
1572 ++m_pos_AuthnQueryService;
1573 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1574 ++m_pos_AssertionIDRequestService;
1578 virtual ~AuthnAuthorityDescriptorImpl() {}
1580 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1581 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1585 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1589 void _clone(const AuthnAuthorityDescriptorImpl& src) {
1590 RoleDescriptorImpl::_clone(src);
1591 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1592 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1594 v.push_back((*i)->cloneAuthnQueryService());
1597 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1598 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1600 w.push_back((*j)->cloneAssertionIDRequestService());
1603 VectorOf(NameIDFormat) x=getNameIDFormats();
1604 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1606 x.push_back((*k)->cloneNameIDFormat());
1611 IMPL_XMLOBJECT_CLONE_EX(AuthnAuthorityDescriptor);
1612 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1613 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1614 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1617 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1618 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1619 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1620 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1621 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1625 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1627 list<XMLObject*>::iterator m_pos_AuthzService;
1628 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1631 m_children.push_back(nullptr);
1632 m_children.push_back(nullptr);
1633 m_pos_AuthzService=m_pos_ContactPerson;
1634 ++m_pos_AuthzService;
1635 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1636 ++m_pos_AssertionIDRequestService;
1640 virtual ~PDPDescriptorImpl() {}
1642 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1643 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1647 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1651 void _clone(const PDPDescriptorImpl& src) {
1652 RoleDescriptorImpl::_clone(src);
1653 VectorOf(AuthzService) v=getAuthzServices();
1654 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1656 v.push_back((*i)->cloneAuthzService());
1659 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1660 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1662 w.push_back((*j)->cloneAssertionIDRequestService());
1665 VectorOf(NameIDFormat) x=getNameIDFormats();
1666 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1668 x.push_back((*k)->cloneNameIDFormat());
1673 IMPL_XMLOBJECT_CLONE_EX(PDPDescriptor);
1674 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1675 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1676 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1679 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1680 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1681 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1682 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1683 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1687 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1689 list<XMLObject*>::iterator m_pos_AttributeService;
1690 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1691 list<XMLObject*>::iterator m_pos_NameIDFormat;
1692 list<XMLObject*>::iterator m_pos_AttributeProfile;
1695 m_children.push_back(nullptr);
1696 m_children.push_back(nullptr);
1697 m_children.push_back(nullptr);
1698 m_children.push_back(nullptr);
1699 m_pos_AttributeService=m_pos_ContactPerson;
1700 ++m_pos_AttributeService;
1701 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1702 ++m_pos_AssertionIDRequestService;
1703 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1704 ++m_pos_NameIDFormat;
1705 m_pos_AttributeProfile=m_pos_NameIDFormat;
1706 ++m_pos_AttributeProfile;
1710 virtual ~AttributeAuthorityDescriptorImpl() {}
1712 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1713 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1717 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1721 void _clone(const AttributeAuthorityDescriptorImpl& src) {
1722 RoleDescriptorImpl::_clone(src);
1723 VectorOf(AttributeService) v=getAttributeServices();
1724 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1726 v.push_back((*i)->cloneAttributeService());
1729 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1730 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1732 w.push_back((*j)->cloneAssertionIDRequestService());
1735 VectorOf(NameIDFormat) x=getNameIDFormats();
1736 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1738 x.push_back((*k)->cloneNameIDFormat());
1741 VectorOf(AttributeProfile) y=getAttributeProfiles();
1742 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1744 y.push_back((*m)->cloneAttributeProfile());
1747 VectorOf(Attribute) z=getAttributes();
1748 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1750 z.push_back((*n)->cloneAttribute());
1755 IMPL_XMLOBJECT_CLONE_EX(AttributeAuthorityDescriptor);
1756 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1757 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1758 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1759 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1760 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1763 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1764 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1765 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1766 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1767 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1768 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1769 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1773 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1776 m_WantAssertionsSigned=XML_BOOL_NULL;
1777 m_children.push_back(nullptr);
1778 m_pos_NameIDFormat=m_pos_ContactPerson;
1779 ++m_pos_NameIDFormat;
1783 list<XMLObject*>::iterator m_pos_NameIDFormat;
1785 QueryDescriptorTypeImpl() {
1790 virtual ~QueryDescriptorTypeImpl() {}
1792 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1793 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1797 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1801 void _clone(const QueryDescriptorTypeImpl& src) {
1802 RoleDescriptorImpl::_clone(src);
1803 WantAssertionsSigned(src.m_WantAssertionsSigned);
1804 VectorOf(NameIDFormat) y=getNameIDFormats();
1805 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1807 y.push_back((*m)->cloneNameIDFormat());
1812 QueryDescriptorType* cloneQueryDescriptorType() const {
1813 return dynamic_cast<QueryDescriptorType*>(clone());
1816 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1817 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1819 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1820 if (!qualifiedName.hasNamespaceURI()) {
1821 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1822 setWantAssertionsSigned(value);
1826 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1830 void marshallAttributes(DOMElement* domElement) const {
1831 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1832 RoleDescriptorImpl::marshallAttributes(domElement);
1835 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1836 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1837 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1841 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1844 virtual ~AuthnQueryDescriptorTypeImpl() {}
1846 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1847 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1849 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1851 IMPL_XMLOBJECT_CLONE_EX(AuthnQueryDescriptorType);
1854 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1857 virtual ~AttributeQueryDescriptorTypeImpl() {}
1859 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1860 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1862 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1865 void _clone(const AttributeQueryDescriptorTypeImpl& src) {
1866 QueryDescriptorTypeImpl::_clone(src);
1867 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1868 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1870 w.push_back((*j)->cloneAttributeConsumingService());
1875 IMPL_XMLOBJECT_CLONE_EX(AttributeQueryDescriptorType);
1876 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1879 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1880 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1881 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1885 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1888 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1890 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1891 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1893 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1896 void _clone(const AuthzDecisionQueryDescriptorTypeImpl& src) {
1897 QueryDescriptorTypeImpl::_clone(src);
1898 VectorOf(ActionNamespace) w=getActionNamespaces();
1899 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1901 w.push_back((*j)->cloneActionNamespace());
1906 IMPL_XMLOBJECT_CLONE_EX(AuthzDecisionQueryDescriptorType);
1907 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1910 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1911 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1912 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1916 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1917 public virtual SignableObject,
1918 public AbstractComplexElement,
1919 public AbstractAttributeExtensibleXMLObject,
1920 public AbstractDOMCachingXMLObject,
1921 public AbstractXMLObjectMarshaller,
1922 public AbstractXMLObjectUnmarshaller
1924 list<XMLObject*>::iterator m_pos_AffiliateMember;
1927 m_ID=m_AffiliationOwnerID=nullptr;
1928 m_ValidUntil=m_CacheDuration=nullptr;
1929 m_children.push_back(nullptr);
1930 m_children.push_back(nullptr);
1931 m_children.push_back(nullptr);
1932 m_Signature=nullptr;
1933 m_Extensions=nullptr;
1934 m_pos_Signature=m_children.begin();
1935 m_pos_Extensions=m_pos_Signature;
1937 m_pos_AffiliateMember=m_pos_Extensions;
1938 ++m_pos_AffiliateMember;
1942 virtual ~AffiliationDescriptorImpl() {
1943 XMLString::release(&m_ID);
1944 XMLString::release(&m_AffiliationOwnerID);
1945 delete m_ValidUntil;
1946 delete m_CacheDuration;
1949 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1950 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1954 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1955 : AbstractXMLObject(src), AbstractComplexElement(src),
1956 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1959 setAffiliationOwnerID(src.getAffiliationOwnerID());
1960 setValidUntil(src.getValidUntil());
1961 setCacheDuration(src.getCacheDuration());
1962 if (src.getSignature())
1963 setSignature(src.getSignature()->cloneSignature());
1964 if (src.getExtensions())
1965 setExtensions(src.getExtensions()->cloneExtensions());
1967 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1968 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1970 v.push_back((*i)->cloneKeyDescriptor());
1973 VectorOf(AffiliateMember) w=getAffiliateMembers();
1974 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1976 w.push_back((*j)->cloneAffiliateMember());
1981 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1983 //IMPL_TYPED_CHILD(Signature);
1984 // Need customized setter.
1986 Signature* m_Signature;
1987 list<XMLObject*>::iterator m_pos_Signature;
1989 Signature* getSignature() const {
1993 void setSignature(Signature* sig) {
1994 prepareForAssignment(m_Signature,sig);
1995 *m_pos_Signature=m_Signature=sig;
1996 // Sync content reference back up.
1998 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2001 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2002 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2003 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2004 IMPL_DURATION_ATTRIB(CacheDuration,0);
2005 IMPL_TYPED_CHILD(Extensions);
2006 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2007 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2009 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2010 if (!qualifiedName.hasNamespaceURI()) {
2011 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2015 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2016 setAffiliationOwnerID(value);
2019 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2020 setValidUntil(value);
2023 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2024 setCacheDuration(value);
2028 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2032 void prepareForMarshalling() const {
2034 declareNonVisibleNamespaces();
2037 void marshallAttributes(DOMElement* domElement) const {
2038 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2039 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
2040 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2041 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2042 marshallExtensionAttributes(domElement);
2045 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2046 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2047 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2048 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2049 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2050 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2053 void processAttribute(const DOMAttr* attribute) {
2054 PROC_ID_ATTRIB(ID,ID,nullptr);
2055 unmarshallExtensionAttribute(attribute);
2059 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2060 public virtual SignableObject,
2061 public AbstractComplexElement,
2062 public AbstractAttributeExtensibleXMLObject,
2063 public AbstractDOMCachingXMLObject,
2064 public AbstractXMLObjectMarshaller,
2065 public AbstractXMLObjectUnmarshaller
2067 list<XMLObject*>::iterator m_pos_ContactPerson;
2070 m_ID=m_EntityID=nullptr;
2071 m_ValidUntil=m_CacheDuration=nullptr;
2072 m_children.push_back(nullptr);
2073 m_children.push_back(nullptr);
2074 m_children.push_back(nullptr);
2075 m_children.push_back(nullptr);
2076 m_children.push_back(nullptr);
2077 m_Signature=nullptr;
2078 m_Extensions=nullptr;
2079 m_AffiliationDescriptor=nullptr;
2080 m_Organization=nullptr;
2081 m_pos_Signature=m_children.begin();
2082 m_pos_Extensions=m_pos_Signature;
2084 m_pos_AffiliationDescriptor=m_pos_Extensions;
2085 ++m_pos_AffiliationDescriptor;
2086 m_pos_Organization=m_pos_AffiliationDescriptor;
2087 ++m_pos_Organization;
2088 m_pos_ContactPerson=m_pos_Organization;
2089 ++m_pos_ContactPerson;
2093 virtual ~EntityDescriptorImpl() {
2094 XMLString::release(&m_ID);
2095 XMLString::release(&m_EntityID);
2096 delete m_ValidUntil;
2097 delete m_CacheDuration;
2100 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2101 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2105 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2106 : AbstractXMLObject(src), AbstractComplexElement(src),
2107 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2110 setEntityID(src.getEntityID());
2111 setValidUntil(src.getValidUntil());
2112 setCacheDuration(src.getCacheDuration());
2113 if (src.getSignature())
2114 setSignature(src.getSignature()->cloneSignature());
2115 if (src.getExtensions())
2116 setExtensions(src.getExtensions()->cloneExtensions());
2117 if (src.getAffiliationDescriptor())
2118 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2119 if (src.getOrganization())
2120 setOrganization(src.getOrganization()->cloneOrganization());
2122 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2124 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2126 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2130 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2132 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2136 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2138 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2142 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2144 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2148 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2150 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2154 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2156 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2160 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2162 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2166 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2168 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2172 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2174 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2180 VectorOf(ContactPerson) v=getContactPersons();
2181 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2183 v.push_back((*j)->cloneContactPerson());
2186 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2187 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2189 w.push_back((*k)->cloneAdditionalMetadataLocation());
2194 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2196 //IMPL_TYPED_CHILD(Signature);
2197 // Need customized setter.
2199 Signature* m_Signature;
2200 list<XMLObject*>::iterator m_pos_Signature;
2202 Signature* getSignature() const {
2206 void setSignature(Signature* sig) {
2207 prepareForAssignment(m_Signature,sig);
2208 *m_pos_Signature=m_Signature=sig;
2209 // Sync content reference back up.
2211 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2214 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2215 IMPL_STRING_ATTRIB(EntityID);
2216 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2217 IMPL_DURATION_ATTRIB(CacheDuration,0);
2218 IMPL_TYPED_CHILD(Extensions);
2219 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2220 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2221 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2222 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2223 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2224 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2225 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2226 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2227 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2228 IMPL_TYPED_CHILD(AffiliationDescriptor);
2229 IMPL_TYPED_CHILD(Organization);
2230 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2231 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2233 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2234 if (!qualifiedName.hasNamespaceURI()) {
2235 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2239 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2243 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2244 setValidUntil(value);
2247 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2248 setCacheDuration(value);
2252 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2255 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2256 // Check for "known" elements/types.
2257 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2258 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2259 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2260 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2261 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2262 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2263 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2264 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2265 if (qname == PDPDescriptor::ELEMENT_QNAME)
2266 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2267 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2268 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2269 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2270 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2271 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2272 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2274 vector<RoleDescriptor*>::const_iterator i =
2275 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2276 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2280 void prepareForMarshalling() const {
2282 declareNonVisibleNamespaces();
2285 void marshallAttributes(DOMElement* domElement) const {
2286 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2287 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2288 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2289 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2290 marshallExtensionAttributes(domElement);
2293 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2294 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2295 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2296 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2297 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2298 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2299 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2300 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2301 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2302 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2303 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2304 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2305 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2306 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2307 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2308 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2309 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2312 void processAttribute(const DOMAttr* attribute) {
2313 PROC_ID_ATTRIB(ID,ID,nullptr);
2314 unmarshallExtensionAttribute(attribute);
2318 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2319 public virtual SignableObject,
2320 public AbstractComplexElement,
2321 public AbstractDOMCachingXMLObject,
2322 public AbstractXMLObjectMarshaller,
2323 public AbstractXMLObjectUnmarshaller
2326 m_ID=m_Name=nullptr;
2327 m_ValidUntil=m_CacheDuration=nullptr;
2328 m_children.push_back(nullptr);
2329 m_children.push_back(nullptr);
2330 m_Signature=nullptr;
2331 m_Extensions=nullptr;
2332 m_pos_Signature=m_children.begin();
2333 m_pos_Extensions=m_pos_Signature;
2338 virtual ~EntitiesDescriptorImpl() {
2339 XMLString::release(&m_ID);
2340 XMLString::release(&m_Name);
2341 delete m_ValidUntil;
2342 delete m_CacheDuration;
2345 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2346 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2350 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2351 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2354 setName(src.getName());
2355 setValidUntil(src.getValidUntil());
2356 setCacheDuration(src.getCacheDuration());
2357 if (src.getSignature())
2358 setSignature(src.getSignature()->cloneSignature());
2359 if (src.getExtensions())
2360 setExtensions(src.getExtensions()->cloneExtensions());
2362 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2364 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2366 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2370 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2372 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2379 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2381 //IMPL_TYPED_CHILD(Signature);
2382 // Need customized setter.
2384 Signature* m_Signature;
2385 list<XMLObject*>::iterator m_pos_Signature;
2387 Signature* getSignature() const {
2391 void setSignature(Signature* sig) {
2392 prepareForAssignment(m_Signature,sig);
2393 *m_pos_Signature=m_Signature=sig;
2394 // Sync content reference back up.
2396 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2399 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2400 IMPL_STRING_ATTRIB(Name);
2401 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2402 IMPL_DURATION_ATTRIB(CacheDuration,0);
2403 IMPL_TYPED_CHILD(Extensions);
2404 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2405 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2408 void prepareForMarshalling() const {
2410 declareNonVisibleNamespaces();
2413 void marshallAttributes(DOMElement* domElement) const {
2414 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2415 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2416 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2417 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2420 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2421 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2422 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2423 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2424 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2425 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2428 void processAttribute(const DOMAttr* attribute) {
2429 PROC_ID_ATTRIB(ID,ID,nullptr);
2430 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2431 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2432 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2436 class SAML_DLLLOCAL DiscoveryResponseImpl : public virtual DiscoveryResponse, public IndexedEndpointTypeImpl
2439 virtual ~DiscoveryResponseImpl() {}
2441 DiscoveryResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2442 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2444 DiscoveryResponseImpl(const DiscoveryResponseImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
2446 IMPL_XMLOBJECT_CLONE_EX(DiscoveryResponse);
2449 class SAML_DLLLOCAL RequestInitiatorImpl : public virtual RequestInitiator, public EndpointTypeImpl
2452 virtual ~RequestInitiatorImpl() {}
2454 RequestInitiatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2455 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2457 RequestInitiatorImpl(const RequestInitiatorImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
2459 IMPL_XMLOBJECT_CLONE_EX(RequestInitiator);
2462 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2463 public AbstractComplexElement,
2464 public AbstractDOMCachingXMLObject,
2465 public AbstractXMLObjectMarshaller,
2466 public AbstractXMLObjectUnmarshaller
2469 virtual ~EntityAttributesImpl() {}
2471 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2472 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2475 EntityAttributesImpl(const EntityAttributesImpl& src)
2476 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2477 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2479 Attribute* a=dynamic_cast<Attribute*>(*i);
2481 getAttributes().push_back(a->cloneAttribute());
2485 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2487 getAssertions().push_back(as->cloneAssertion());
2494 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2495 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2496 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2499 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2500 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2501 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2502 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2506 class SAML_DLLLOCAL DigestMethodImpl : public virtual DigestMethod,
2507 public AbstractComplexElement,
2508 public AbstractDOMCachingXMLObject,
2509 public AbstractXMLObjectMarshaller,
2510 public AbstractXMLObjectUnmarshaller
2513 virtual ~DigestMethodImpl() {
2514 XMLString::release(&m_Algorithm);
2517 DigestMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2518 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2519 m_Algorithm = nullptr;
2522 DigestMethodImpl(const DigestMethodImpl& src)
2523 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2524 setAlgorithm(src.getAlgorithm());
2525 VectorOf(XMLObject) v=getUnknownXMLObjects();
2526 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
2527 v.push_back((*i)->clone());
2530 IMPL_XMLOBJECT_CLONE(DigestMethod);
2531 IMPL_STRING_ATTRIB(Algorithm);
2532 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2535 void marshallAttributes(DOMElement* domElement) const {
2536 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2539 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2541 getUnknownXMLObjects().push_back(childXMLObject);
2544 void processAttribute(const DOMAttr* attribute) {
2545 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2549 class SAML_DLLLOCAL SigningMethodImpl : public virtual SigningMethod,
2550 public AbstractComplexElement,
2551 public AbstractDOMCachingXMLObject,
2552 public AbstractXMLObjectMarshaller,
2553 public AbstractXMLObjectUnmarshaller
2556 virtual ~SigningMethodImpl() {
2557 XMLString::release(&m_Algorithm);
2558 XMLString::release(&m_MinKeySize);
2559 XMLString::release(&m_MaxKeySize);
2562 SigningMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2563 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2564 m_Algorithm = nullptr;
2565 m_MinKeySize = nullptr;
2566 m_MaxKeySize = nullptr;
2569 SigningMethodImpl(const SigningMethodImpl& src)
2570 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2571 setAlgorithm(src.getAlgorithm());
2572 setMinKeySize(src.m_MinKeySize);
2573 setMaxKeySize(src.m_MaxKeySize);
2574 VectorOf(XMLObject) v=getUnknownXMLObjects();
2575 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
2576 v.push_back((*i)->clone());
2579 IMPL_XMLOBJECT_CLONE(SigningMethod);
2580 IMPL_STRING_ATTRIB(Algorithm);
2581 IMPL_INTEGER_ATTRIB(MinKeySize);
2582 IMPL_INTEGER_ATTRIB(MaxKeySize);
2583 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2586 void marshallAttributes(DOMElement* domElement) const {
2587 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2588 MARSHALL_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2589 MARSHALL_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2592 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2594 getUnknownXMLObjects().push_back(childXMLObject);
2597 void processAttribute(const DOMAttr* attribute) {
2598 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2599 PROC_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2600 PROC_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2604 class SAML_DLLLOCAL DisplayNameImpl : public virtual DisplayName, public localizedNameTypeImpl
2607 virtual ~DisplayNameImpl() {}
2609 DisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2610 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2612 DisplayNameImpl(const DisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2614 IMPL_XMLOBJECT_CLONE_EX(DisplayName);
2617 class SAML_DLLLOCAL DescriptionImpl : public virtual Description, public localizedNameTypeImpl
2620 virtual ~DescriptionImpl() {}
2622 DescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2623 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2625 DescriptionImpl(const DescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2627 IMPL_XMLOBJECT_CLONE_EX(Description);
2630 class SAML_DLLLOCAL InformationURLImpl : public virtual InformationURL, public localizedURITypeImpl
2633 virtual ~InformationURLImpl() {}
2635 InformationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2636 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2638 InformationURLImpl(const InformationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2640 IMPL_XMLOBJECT_CLONE_EX(InformationURL);
2643 class SAML_DLLLOCAL PrivacyStatementURLImpl : public virtual PrivacyStatementURL, public localizedURITypeImpl
2646 virtual ~PrivacyStatementURLImpl() {}
2648 PrivacyStatementURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2649 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2651 PrivacyStatementURLImpl(const PrivacyStatementURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2653 IMPL_XMLOBJECT_CLONE_EX(PrivacyStatementURL);
2656 class SAML_DLLLOCAL KeywordsImpl : public virtual Keywords,
2657 public AbstractSimpleElement,
2658 public AbstractDOMCachingXMLObject,
2659 public AbstractXMLObjectMarshaller,
2660 public AbstractXMLObjectUnmarshaller
2664 m_LangPrefix=nullptr;
2673 virtual ~KeywordsImpl() {
2674 XMLString::release(&m_Lang);
2675 XMLString::release(&m_LangPrefix);
2678 KeywordsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2679 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2683 KeywordsImpl(const KeywordsImpl& src)
2684 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2686 setLang(src.getLang());
2687 if (src.m_LangPrefix)
2688 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
2691 IMPL_XMLOBJECT_CLONE(Keywords);
2692 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2695 void marshallAttributes(DOMElement* domElement) const {
2696 if (m_Lang && *m_Lang) {
2697 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2698 if (m_LangPrefix && *m_LangPrefix)
2699 attr->setPrefix(m_LangPrefix);
2701 attr->setPrefix(xmlconstants::XML_PREFIX);
2702 attr->setNodeValue(m_Lang);
2703 domElement->setAttributeNodeNS(attr);
2707 void processAttribute(const DOMAttr* attribute) {
2708 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2709 setLang(attribute->getValue());
2710 const XMLCh* temp = attribute->getPrefix();
2711 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2712 m_LangPrefix = XMLString::replicate(temp);
2715 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2719 class SAML_DLLLOCAL LogoImpl : public virtual Logo,
2720 public AbstractSimpleElement,
2721 public AbstractDOMCachingXMLObject,
2722 public AbstractXMLObjectMarshaller,
2723 public AbstractXMLObjectUnmarshaller
2727 m_LangPrefix=nullptr;
2738 virtual ~LogoImpl() {
2739 XMLString::release(&m_Lang);
2740 XMLString::release(&m_LangPrefix);
2741 XMLString::release(&m_Height);
2742 XMLString::release(&m_Width);
2745 LogoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2746 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2750 LogoImpl(const LogoImpl& src)
2751 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2753 setLang(src.getLang());
2754 if (src.m_LangPrefix)
2755 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
2756 setHeight(src.m_Height);
2757 setWidth(src.m_Width);
2760 IMPL_XMLOBJECT_CLONE(Logo);
2761 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2762 IMPL_INTEGER_ATTRIB(Height);
2763 IMPL_INTEGER_ATTRIB(Width);
2766 void marshallAttributes(DOMElement* domElement) const {
2767 if (m_Lang && *m_Lang) {
2768 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2769 if (m_LangPrefix && *m_LangPrefix)
2770 attr->setPrefix(m_LangPrefix);
2772 attr->setPrefix(xmlconstants::XML_PREFIX);
2773 attr->setNodeValue(m_Lang);
2774 domElement->setAttributeNodeNS(attr);
2776 MARSHALL_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2777 MARSHALL_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2780 void processAttribute(const DOMAttr* attribute) {
2781 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2782 setLang(attribute->getValue());
2783 const XMLCh* temp = attribute->getPrefix();
2784 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2785 m_LangPrefix = XMLString::replicate(temp);
2788 PROC_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2789 PROC_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2790 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2794 class SAML_DLLLOCAL UIInfoImpl : public virtual UIInfo,
2795 public AbstractComplexElement,
2796 public AbstractDOMCachingXMLObject,
2797 public AbstractXMLObjectMarshaller,
2798 public AbstractXMLObjectUnmarshaller
2801 virtual ~UIInfoImpl() {}
2803 UIInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2804 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2807 UIInfoImpl(const UIInfoImpl& src)
2808 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2809 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2811 DisplayName* dn=dynamic_cast<DisplayName*>(*i);
2813 getDisplayNames().push_back(dn->cloneDisplayName());
2817 Description* des=dynamic_cast<Description*>(*i);
2819 getDescriptions().push_back(des->cloneDescription());
2823 Keywords* key=dynamic_cast<Keywords*>(*i);
2825 getKeywordss().push_back(key->cloneKeywords());
2829 Logo* logo=dynamic_cast<Logo*>(*i);
2831 getLogos().push_back(logo->cloneLogo());
2835 InformationURL* inf=dynamic_cast<InformationURL*>(*i);
2837 getInformationURLs().push_back(inf->cloneInformationURL());
2841 PrivacyStatementURL* priv=dynamic_cast<PrivacyStatementURL*>(*i);
2843 getPrivacyStatementURLs().push_back(priv->clonePrivacyStatementURL());
2847 getUnknownXMLObjects().push_back((*i)->clone());
2852 IMPL_XMLOBJECT_CLONE(UIInfo);
2853 IMPL_TYPED_CHILDREN(DisplayName,m_children.end());
2854 IMPL_TYPED_CHILDREN(Description,m_children.end());
2855 IMPL_TYPED_CHILDREN(Keywords,m_children.end());
2856 IMPL_TYPED_CHILDREN(Logo,m_children.end());
2857 IMPL_TYPED_CHILDREN(InformationURL,m_children.end());
2858 IMPL_TYPED_CHILDREN(PrivacyStatementURL,m_children.end());
2859 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2862 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2863 PROC_TYPED_CHILDREN(DisplayName,SAML20MD_UI_NS,false);
2864 PROC_TYPED_CHILDREN(Description,SAML20MD_UI_NS,false);
2865 PROC_TYPED_CHILDREN(Keywords,SAML20MD_UI_NS,false);
2866 PROC_TYPED_CHILDREN(Logo,SAML20MD_UI_NS,false);
2867 PROC_TYPED_CHILDREN(InformationURL,SAML20MD_UI_NS,false);
2868 PROC_TYPED_CHILDREN(PrivacyStatementURL,SAML20MD_UI_NS,false);
2871 const XMLCh* nsURI=root->getNamespaceURI();
2872 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2873 getUnknownXMLObjects().push_back(childXMLObject);
2877 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2881 class SAML_DLLLOCAL DiscoHintsImpl : public virtual DiscoHints,
2882 public AbstractComplexElement,
2883 public AbstractDOMCachingXMLObject,
2884 public AbstractXMLObjectMarshaller,
2885 public AbstractXMLObjectUnmarshaller
2888 virtual ~DiscoHintsImpl() {}
2890 DiscoHintsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2891 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2894 DiscoHintsImpl(const DiscoHintsImpl& src)
2895 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2896 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2898 IPHint* ip=dynamic_cast<IPHint*>(*i);
2900 getIPHints().push_back(ip->cloneIPHint());
2904 DomainHint* dom=dynamic_cast<DomainHint*>(*i);
2906 getDomainHints().push_back(dom->cloneDomainHint());
2910 GeolocationHint* geo=dynamic_cast<GeolocationHint*>(*i);
2912 getGeolocationHints().push_back(geo->cloneGeolocationHint());
2916 getUnknownXMLObjects().push_back((*i)->clone());
2921 IMPL_XMLOBJECT_CLONE(DiscoHints);
2922 IMPL_TYPED_CHILDREN(IPHint,m_children.end());
2923 IMPL_TYPED_CHILDREN(DomainHint,m_children.end());
2924 IMPL_TYPED_CHILDREN(GeolocationHint,m_children.end());
2925 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2928 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2929 PROC_TYPED_CHILDREN(IPHint,SAML20MD_UI_NS,false);
2930 PROC_TYPED_CHILDREN(DomainHint,SAML20MD_UI_NS,false);
2931 PROC_TYPED_CHILDREN(GeolocationHint,SAML20MD_UI_NS,false);
2934 const XMLCh* nsURI=root->getNamespaceURI();
2935 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2936 getUnknownXMLObjects().push_back(childXMLObject);
2940 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2947 #if defined (_MSC_VER)
2948 #pragma warning( pop )
2951 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2952 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2953 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2954 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2955 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2956 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2957 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2958 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2960 // Builder Implementations
2962 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2963 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2964 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2965 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2966 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2967 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2968 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2969 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2970 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2971 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2972 IMPL_XMLOBJECTBUILDER(AttributeService);
2973 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2974 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2975 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2976 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2977 IMPL_XMLOBJECTBUILDER(AuthzService);
2978 IMPL_XMLOBJECTBUILDER(Company);
2979 IMPL_XMLOBJECTBUILDER(ContactPerson);
2980 IMPL_XMLOBJECTBUILDER(EmailAddress);
2981 IMPL_XMLOBJECTBUILDER(EndpointType);
2982 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2983 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2984 IMPL_XMLOBJECTBUILDER(Extensions);
2985 IMPL_XMLOBJECTBUILDER(GivenName);
2986 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2987 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2988 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2989 IMPL_XMLOBJECTBUILDER(localizedNameType);
2990 IMPL_XMLOBJECTBUILDER(localizedURIType);
2991 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2992 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2993 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2994 IMPL_XMLOBJECTBUILDER(Organization);
2995 IMPL_XMLOBJECTBUILDER(OrganizationName);
2996 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2997 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2998 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2999 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
3000 IMPL_XMLOBJECTBUILDER(ServiceDescription);
3001 IMPL_XMLOBJECTBUILDER(ServiceName);
3002 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
3003 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
3004 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
3005 IMPL_XMLOBJECTBUILDER(SurName);
3006 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
3008 IMPL_XMLOBJECTBUILDER(ActionNamespace);
3009 IMPL_XMLOBJECTBUILDER(SourceID);
3010 IMPL_XMLOBJECTBUILDER(DiscoveryResponse);
3011 IMPL_XMLOBJECTBUILDER(RequestInitiator);
3012 IMPL_XMLOBJECTBUILDER(EntityAttributes);
3013 IMPL_XMLOBJECTBUILDER(DigestMethod);
3014 IMPL_XMLOBJECTBUILDER(SigningMethod);
3015 IMPL_XMLOBJECTBUILDER(DisplayName);
3016 IMPL_XMLOBJECTBUILDER(Description);
3017 IMPL_XMLOBJECTBUILDER(Keywords);
3018 IMPL_XMLOBJECTBUILDER(Logo);
3019 IMPL_XMLOBJECTBUILDER(InformationURL);
3020 IMPL_XMLOBJECTBUILDER(PrivacyStatementURL);
3021 IMPL_XMLOBJECTBUILDER(UIInfo);
3022 IMPL_XMLOBJECTBUILDER(IPHint);
3023 IMPL_XMLOBJECTBUILDER(DomainHint);
3024 IMPL_XMLOBJECTBUILDER(GeolocationHint);
3025 IMPL_XMLOBJECTBUILDER(DiscoHints);
3027 #ifdef HAVE_COVARIANT_RETURNS
3028 RoleDescriptor* RoleDescriptorBuilder::buildObject(
3030 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
3032 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
3035 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
3038 const DigestMethod* RoleDescriptor::getDigestMethod() const
3040 bool roleLevel = false;
3041 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3043 if (getExtensions()) {
3044 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3045 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3046 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3048 if (dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3056 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3057 if (entity && entity->getExtensions()) {
3058 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3059 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3060 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3061 if (dm && dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3070 pair<const SigningMethod*,const Credential*> RoleDescriptor::getSigningMethod(const CredentialResolver& resolver, CredentialCriteria& cc) const
3072 bool roleLevel = false;
3073 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3075 if (getExtensions()) {
3076 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3077 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3078 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3081 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3082 cc.setXMLAlgorithm(sm->getAlgorithm());
3083 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3084 if (minsize.first || maxsize.first) {
3085 cc.setKeySize(minsize.first ? minsize.second : 0);
3086 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3090 cc.setMaxKeySize(0);
3092 const Credential* cred = resolver.resolve(&cc);
3094 return make_pair(sm, cred);
3101 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3102 if (entity && entity->getExtensions()) {
3103 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3104 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3105 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3107 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3108 cc.setXMLAlgorithm(sm->getAlgorithm());
3109 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3110 if (minsize.first || maxsize.first) {
3111 cc.setKeySize(minsize.first ? minsize.second : 0);
3112 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3116 cc.setMaxKeySize(0);
3118 const Credential* cred = resolver.resolve(&cc);
3120 return make_pair(sm, cred);
3128 cc.setMaxKeySize(0);
3129 cc.setXMLAlgorithm(nullptr);
3130 return pair<const SigningMethod*,const Credential*>(nullptr, resolver.resolve(&cc));
3133 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
3134 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);
3135 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);
3136 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
3137 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
3138 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);
3139 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);
3140 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3141 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);
3142 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);
3143 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);
3144 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);
3145 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);
3146 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);
3147 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);
3148 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);
3149 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3150 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3151 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
3152 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3153 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);
3154 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
3155 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);
3156 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);
3157 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3158 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);
3159 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);
3160 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3161 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);
3162 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
3163 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
3164 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
3165 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
3166 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
3167 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
3168 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
3169 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
3170 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
3171 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
3172 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
3173 const XMLCh Description::LOCAL_NAME[] = UNICODE_LITERAL_11(D,e,s,c,r,i,p,t,i,o,n);
3174 const XMLCh DigestMethod::LOCAL_NAME[] = UNICODE_LITERAL_12(D,i,g,e,s,t,M,e,t,h,o,d);
3175 const XMLCh DigestMethod::TYPE_NAME[] = UNICODE_LITERAL_16(D,i,g,e,s,t,M,e,t,h,o,d,T,y,p,e);
3176 const XMLCh DigestMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3177 const XMLCh DiscoHints::LOCAL_NAME[] = UNICODE_LITERAL_10(D,i,s,c,o,H,i,n,t,s);
3178 const XMLCh DiscoHints::TYPE_NAME[] = UNICODE_LITERAL_14(D,i,s,c,o,H,i,n,t,s,T,y,p,e);
3179 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);
3180 const XMLCh DisplayName::LOCAL_NAME[] = UNICODE_LITERAL_11(D,i,s,p,l,a,y,N,a,m,e);
3181 const XMLCh DomainHint::LOCAL_NAME[] = UNICODE_LITERAL_10(D,o,m,a,i,n,H,i,n,t);
3182 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
3183 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
3184 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
3185 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
3186 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
3187 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);
3188 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);
3189 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);
3190 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3191 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
3192 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
3193 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);
3194 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3195 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
3196 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
3197 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);
3198 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
3199 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
3200 const XMLCh GeolocationHint::LOCAL_NAME[] = UNICODE_LITERAL_15(G,e,o,l,o,c,a,t,i,o,n,H,i,n,t);
3201 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
3202 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3203 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);
3204 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);
3205 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
3206 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);
3207 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3208 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3209 const XMLCh InformationURL::LOCAL_NAME[] = UNICODE_LITERAL_14(I,n,f,o,r,m,a,t,i,o,n,U,R,L);
3210 const XMLCh IPHint::LOCAL_NAME[] = UNICODE_LITERAL_6(I,P,H,i,n,t);
3211 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
3212 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);
3213 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
3214 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
3215 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
3216 const XMLCh Keywords::LOCAL_NAME[] = UNICODE_LITERAL_8(K,e,y,w,o,r,d,s);
3217 const XMLCh Keywords::TYPE_NAME[] = UNICODE_LITERAL_12(K,e,y,w,o,r,d,s,T,y,p,e);
3218 const XMLCh Keywords::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3219 const XMLCh Logo::LOCAL_NAME[] = UNICODE_LITERAL_4(L,o,g,o);
3220 const XMLCh Logo::TYPE_NAME[] = UNICODE_LITERAL_8(L,o,g,o,T,y,p,e);
3221 const XMLCh Logo::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3222 const XMLCh Logo::HEIGHT_ATTRIB_NAME[] = UNICODE_LITERAL_6(h,e,i,g,h,t);
3223 const XMLCh Logo::WIDTH_ATTRIB_NAME[] = UNICODE_LITERAL_5(w,i,d,t,h);
3224 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
3225 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);
3226 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3227 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
3228 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
3229 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3230 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);
3231 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
3232 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);
3233 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
3234 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
3235 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
3236 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);
3237 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
3238 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
3239 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);
3240 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);
3241 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
3242 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);
3243 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);
3244 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);
3245 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);
3246 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
3247 const XMLCh RequestInitiator::LOCAL_NAME[] = UNICODE_LITERAL_16(R,e,q,u,e,s,t,I,n,i,t,i,a,t,o,r);
3248 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3249 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3250 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);
3251 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
3252 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);
3253 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
3254 const XMLCh SigningMethod::LOCAL_NAME[] = UNICODE_LITERAL_13(S,i,g,n,i,n,g,M,e,t,h,o,d);
3255 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);
3256 const XMLCh SigningMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3257 const XMLCh SigningMethod::MINKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,i,n,K,e,y,S,i,z,e);
3258 const XMLCh SigningMethod::MAXKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,a,x,K,e,y,S,i,z,e);
3259 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);
3260 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);
3261 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
3262 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3263 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);
3264 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);
3265 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);
3266 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
3267 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);
3268 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
3269 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
3270 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
3271 const XMLCh UIInfo::LOCAL_NAME[] = UNICODE_LITERAL_6(U,I,I,n,f,o);
3272 const XMLCh UIInfo::TYPE_NAME[] = UNICODE_LITERAL_10(U,I,I,n,f,o,T,y,p,e);