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 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) {
297 getUnknownXMLObjects().push_back((*i)->clone());
302 IMPL_XMLOBJECT_CLONE(Extensions);
303 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
306 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
308 const XMLCh* nsURI=root->getNamespaceURI();
309 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
310 getUnknownXMLObjects().push_back(childXMLObject);
314 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
318 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
319 public AbstractComplexElement,
320 public AbstractAttributeExtensibleXMLObject,
321 public AbstractDOMCachingXMLObject,
322 public AbstractXMLObjectMarshaller,
323 public AbstractXMLObjectUnmarshaller
325 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
326 list<XMLObject*>::iterator m_pos_OrganizationURL;
329 m_children.push_back(nullptr);
330 m_children.push_back(nullptr);
331 m_children.push_back(nullptr);
332 m_Extensions=nullptr;
333 m_pos_Extensions=m_children.begin();
334 m_pos_OrganizationDisplayName=m_pos_Extensions;
335 ++m_pos_OrganizationDisplayName;
336 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
337 ++m_pos_OrganizationURL;
341 virtual ~OrganizationImpl() {}
343 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
344 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
348 OrganizationImpl(const OrganizationImpl& src)
349 : AbstractXMLObject(src), AbstractComplexElement(src),
350 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
352 if (src.getExtensions())
353 setExtensions(src.getExtensions()->cloneExtensions());
354 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
356 getOrganizationNames().push_back((*i)->cloneOrganizationName());
359 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
361 getOrganizationDisplayNames().push_back((*j)->cloneOrganizationDisplayName());
364 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
366 getOrganizationURLs().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;
427 virtual ~ContactPersonImpl() {
428 XMLString::release(&m_ContactType);
431 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
432 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
436 ContactPersonImpl(const ContactPersonImpl& src)
437 : AbstractXMLObject(src), AbstractComplexElement(src),
438 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
440 if (src.getExtensions())
441 setExtensions(src.getExtensions()->cloneExtensions());
442 if (src.getCompany())
443 setCompany(src.getCompany()->cloneCompany());
444 if (src.getGivenName())
445 setGivenName(src.getGivenName()->cloneGivenName());
446 if (src.getSurName())
447 setSurName(src.getSurName()->cloneSurName());
449 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
451 getEmailAddresss().push_back((*i)->cloneEmailAddress());
454 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
456 getTelephoneNumbers().push_back((*j)->cloneTelephoneNumber());
461 IMPL_XMLOBJECT_CLONE(ContactPerson);
462 IMPL_STRING_ATTRIB(ContactType);
463 IMPL_TYPED_CHILD(Extensions);
464 IMPL_TYPED_CHILD(Company);
465 IMPL_TYPED_CHILD(GivenName);
466 IMPL_TYPED_CHILD(SurName);
467 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
468 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
470 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
471 if (!qualifiedName.hasNamespaceURI()) {
472 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
473 setContactType(value);
477 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
481 void marshallAttributes(DOMElement* domElement) const {
482 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
483 marshallExtensionAttributes(domElement);
486 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
487 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
488 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
489 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
490 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
491 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
492 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
493 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
496 void processAttribute(const DOMAttr* attribute) {
497 unmarshallExtensionAttribute(attribute);
501 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
502 public AbstractSimpleElement,
503 public AbstractDOMCachingXMLObject,
504 public AbstractXMLObjectMarshaller,
505 public AbstractXMLObjectUnmarshaller
512 virtual ~AdditionalMetadataLocationImpl() {
513 XMLString::release(&m_Namespace);
516 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
517 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
521 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
522 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
524 setNamespace(src.getNamespace());
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();
555 virtual ~KeyDescriptorImpl() {
556 XMLString::release(&m_Use);
559 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
560 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
564 KeyDescriptorImpl(const KeyDescriptorImpl& src)
565 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
567 setUse(src.getUse());
568 if (src.getKeyInfo())
569 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
570 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
572 getEncryptionMethods().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 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) {
641 getUnknownXMLObjects().push_back((*i)->clone());
646 IMPL_XMLOBJECT_CLONE_EX(EndpointType);
647 IMPL_STRING_ATTRIB(Binding);
648 IMPL_STRING_ATTRIB(Location);
649 IMPL_STRING_ATTRIB(ResponseLocation);
650 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
652 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
653 if (!qualifiedName.hasNamespaceURI()) {
654 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
658 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
662 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
663 setResponseLocation(value);
667 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
670 void marshallAttributes(DOMElement* domElement) const {
671 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
672 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
673 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
674 marshallExtensionAttributes(domElement);
677 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
679 const XMLCh* nsURI=root->getNamespaceURI();
680 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
681 getUnknownXMLObjects().push_back(childXMLObject);
684 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
687 void processAttribute(const DOMAttr* attribute) {
688 unmarshallExtensionAttribute(attribute);
692 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
696 m_isDefault=XML_BOOL_NULL;
700 IndexedEndpointTypeImpl() {
704 virtual ~IndexedEndpointTypeImpl() {
705 XMLString::release(&m_Index);
708 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
709 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
713 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
717 void _clone(const IndexedEndpointTypeImpl& src) {
718 EndpointTypeImpl::_clone(src);
719 setIndex(src.m_Index);
720 isDefault(src.m_isDefault);
723 IMPL_XMLOBJECT_CLONE_EX(IndexedEndpointType);
724 IMPL_INTEGER_ATTRIB(Index);
725 IMPL_BOOLEAN_ATTRIB(isDefault);
727 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
728 if (!qualifiedName.hasNamespaceURI()) {
729 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
733 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
738 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
742 void marshallAttributes(DOMElement* domElement) const {
743 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
744 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
745 EndpointTypeImpl::marshallAttributes(domElement);
749 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
752 virtual ~ArtifactResolutionServiceImpl() {}
754 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
755 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
757 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
759 IMPL_XMLOBJECT_CLONE_EX(ArtifactResolutionService);
762 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
765 virtual ~SingleLogoutServiceImpl() {}
767 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
768 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
770 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
772 IMPL_XMLOBJECT_CLONE_EX(SingleLogoutService);
775 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
778 virtual ~ManageNameIDServiceImpl() {}
780 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
781 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
783 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
785 IMPL_XMLOBJECT_CLONE_EX(ManageNameIDService);
788 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
791 virtual ~SingleSignOnServiceImpl() {}
793 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
794 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
796 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
798 IMPL_XMLOBJECT_CLONE_EX(SingleSignOnService);
801 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
804 virtual ~NameIDMappingServiceImpl() {}
806 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
807 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
809 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
811 IMPL_XMLOBJECT_CLONE_EX(NameIDMappingService);
814 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
817 virtual ~AssertionIDRequestServiceImpl() {}
819 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
820 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
822 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
824 IMPL_XMLOBJECT_CLONE_EX(AssertionIDRequestService);
827 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
830 virtual ~AssertionConsumerServiceImpl() {}
832 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
833 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
835 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
837 IMPL_XMLOBJECT_CLONE_EX(AssertionConsumerService);
840 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
843 virtual ~AuthnQueryServiceImpl() {}
845 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
846 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
848 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
850 IMPL_XMLOBJECT_CLONE_EX(AuthnQueryService);
853 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
856 virtual ~AuthzServiceImpl() {}
858 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
859 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
861 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
863 IMPL_XMLOBJECT_CLONE_EX(AuthzService);
866 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
869 virtual ~AttributeServiceImpl() {}
871 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
872 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
874 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
876 IMPL_XMLOBJECT_CLONE_EX(AttributeService);
879 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
880 public virtual SignableObject,
881 public AbstractComplexElement,
882 public AbstractAttributeExtensibleXMLObject,
883 public AbstractDOMCachingXMLObject,
884 public AbstractXMLObjectMarshaller,
885 public AbstractXMLObjectUnmarshaller
888 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
889 m_ValidUntil=m_CacheDuration=nullptr;
890 m_children.push_back(nullptr);
891 m_children.push_back(nullptr);
892 m_children.push_back(nullptr);
893 m_children.push_back(nullptr);
895 m_Extensions=nullptr;
896 m_Organization=nullptr;
897 m_pos_Signature=m_children.begin();
898 m_pos_Extensions=m_pos_Signature;
900 m_pos_Organization=m_pos_Extensions;
901 ++m_pos_Organization;
902 m_pos_ContactPerson=m_pos_Organization;
903 ++m_pos_ContactPerson;
907 list<XMLObject*>::iterator m_pos_ContactPerson;
909 RoleDescriptorImpl() {
914 virtual ~RoleDescriptorImpl() {
915 XMLString::release(&m_ID);
916 XMLString::release(&m_ProtocolSupportEnumeration);
917 XMLString::release(&m_ErrorURL);
919 delete m_CacheDuration;
922 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
923 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
927 RoleDescriptorImpl(const RoleDescriptorImpl& src)
928 : AbstractXMLObject(src), AbstractComplexElement(src),
929 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
933 void _clone(const RoleDescriptorImpl& src) {
935 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
936 setErrorURL(src.getErrorURL());
937 setValidUntil(src.getValidUntil());
938 setCacheDuration(src.getCacheDuration());
939 if (src.getSignature())
940 setSignature(src.getSignature()->cloneSignature());
941 if (src.getExtensions())
942 setExtensions(src.getExtensions()->cloneExtensions());
943 if (src.getOrganization())
944 setOrganization(src.getOrganization()->cloneOrganization());
946 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
948 getKeyDescriptors().push_back((*i)->cloneKeyDescriptor());
951 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
953 getContactPersons().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 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) {
1118 getUnknownXMLObjects().push_back((*i)->clone());
1123 IMPL_XMLOBJECT_CLONE_EX(RoleDescriptorType);
1124 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1127 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1128 getUnknownXMLObjects().push_back(childXMLObject);
1132 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1135 m_children.push_back(nullptr);
1136 m_children.push_back(nullptr);
1137 m_children.push_back(nullptr);
1138 m_children.push_back(nullptr);
1139 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1140 ++m_pos_ArtifactResolutionService;
1141 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1142 ++m_pos_SingleLogoutService;
1143 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1144 ++m_pos_ManageNameIDService;
1145 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1146 ++m_pos_NameIDFormat;
1150 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1151 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1152 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1153 list<XMLObject*>::iterator m_pos_NameIDFormat;
1155 SSODescriptorTypeImpl() {
1160 virtual ~SSODescriptorTypeImpl() {}
1162 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1163 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1167 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1171 void _clone(const SSODescriptorTypeImpl& src) {
1172 RoleDescriptorImpl::_clone(src);
1173 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1175 getArtifactResolutionServices().push_back((*i)->cloneArtifactResolutionService());
1178 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1180 getSingleLogoutServices().push_back((*j)->cloneSingleLogoutService());
1183 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1185 getManageNameIDServices().push_back((*k)->cloneManageNameIDService());
1188 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1190 getNameIDFormats().push_back((*m)->cloneNameIDFormat());
1195 SSODescriptorType* cloneSSODescriptorType() const {
1196 return dynamic_cast<SSODescriptorType*>(clone());
1199 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1200 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1201 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1202 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1205 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1206 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1207 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1208 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1209 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1210 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1214 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1216 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1217 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1218 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1219 list<XMLObject*>::iterator m_pos_AttributeProfile;
1222 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1223 m_children.push_back(nullptr);
1224 m_children.push_back(nullptr);
1225 m_children.push_back(nullptr);
1226 m_children.push_back(nullptr);
1227 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1228 ++m_pos_SingleSignOnService;
1229 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1230 ++m_pos_NameIDMappingService;
1231 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1232 ++m_pos_AssertionIDRequestService;
1233 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1234 ++m_pos_AttributeProfile;
1238 virtual ~IDPSSODescriptorImpl() {}
1240 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1241 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1245 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1249 void _clone(const IDPSSODescriptorImpl& src) {
1250 SSODescriptorTypeImpl::_clone(src);
1251 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1252 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1254 getSingleSignOnServices().push_back((*i)->cloneSingleSignOnService());
1257 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1259 getNameIDMappingServices().push_back((*j)->cloneNameIDMappingService());
1262 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1264 getAssertionIDRequestServices().push_back((*k)->cloneAssertionIDRequestService());
1267 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1269 getAttributeProfiles().push_back((*m)->cloneAttributeProfile());
1272 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1274 getAttributes().push_back((*n)->cloneAttribute());
1279 IMPL_XMLOBJECT_CLONE_EX(IDPSSODescriptor);
1280 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1281 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1282 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1283 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1284 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1285 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1287 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1288 if (!qualifiedName.hasNamespaceURI()) {
1289 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1290 setWantAuthnRequestsSigned(value);
1294 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1298 void marshallAttributes(DOMElement* domElement) const {
1299 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1300 RoleDescriptorImpl::marshallAttributes(domElement);
1303 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1304 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1305 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1306 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1307 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1308 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1309 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1313 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1314 public AbstractComplexElement,
1315 public AbstractAttributeExtensibleXMLObject,
1316 public AbstractDOMCachingXMLObject,
1317 public AbstractXMLObjectMarshaller,
1318 public AbstractXMLObjectUnmarshaller
1321 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1322 m_isRequired=XML_BOOL_NULL;
1326 virtual ~RequestedAttributeImpl() {
1327 XMLString::release(&m_Name);
1328 XMLString::release(&m_NameFormat);
1329 XMLString::release(&m_FriendlyName);
1332 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1333 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1337 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1338 : AbstractXMLObject(src), AbstractComplexElement(src),
1339 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1341 setName(src.getName());
1342 setNameFormat(src.getNameFormat());
1343 setFriendlyName(src.getFriendlyName());
1344 isRequired(src.m_isRequired);
1345 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1347 getAttributeValues().push_back((*i)->clone());
1352 IMPL_XMLOBJECT_CLONE2(RequestedAttribute,Attribute);
1353 IMPL_STRING_ATTRIB(Name);
1354 IMPL_STRING_ATTRIB(NameFormat);
1355 IMPL_STRING_ATTRIB(FriendlyName);
1356 IMPL_BOOLEAN_ATTRIB(isRequired);
1357 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1359 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1360 if (!qualifiedName.hasNamespaceURI()) {
1361 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1365 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1366 setNameFormat(value);
1369 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1370 setFriendlyName(value);
1373 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1374 setisRequired(value);
1378 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1382 void marshallAttributes(DOMElement* domElement) const {
1383 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1384 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1385 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1386 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1387 marshallExtensionAttributes(domElement);
1390 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1391 getAttributeValues().push_back(childXMLObject);
1394 void processAttribute(const DOMAttr* attribute) {
1395 unmarshallExtensionAttribute(attribute);
1399 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1400 public AbstractComplexElement,
1401 public AbstractDOMCachingXMLObject,
1402 public AbstractXMLObjectMarshaller,
1403 public AbstractXMLObjectUnmarshaller
1405 list<XMLObject*>::iterator m_pos_ServiceDescription;
1406 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1410 m_isDefault=XML_BOOL_NULL;
1411 m_children.push_back(nullptr);
1412 m_children.push_back(nullptr);
1413 m_pos_ServiceDescription=m_children.begin();
1414 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1415 ++m_pos_RequestedAttribute;
1419 virtual ~AttributeConsumingServiceImpl() {
1420 XMLString::release(&m_Index);
1423 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1424 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1428 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1429 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1431 setIndex(src.m_Index);
1432 isDefault(src.m_isDefault);
1433 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1435 getServiceNames().push_back((*i)->cloneServiceName());
1438 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1440 getServiceDescriptions().push_back((*j)->cloneServiceDescription());
1443 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1445 getRequestedAttributes().push_back((*k)->cloneRequestedAttribute());
1450 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1451 IMPL_INTEGER_ATTRIB(Index);
1452 IMPL_BOOLEAN_ATTRIB(isDefault);
1453 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1454 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1455 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1458 void marshallAttributes(DOMElement* domElement) const {
1459 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1460 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1463 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1464 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1465 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1466 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1467 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1470 void processAttribute(const DOMAttr* attribute) {
1471 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1472 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1473 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1477 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1479 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1482 m_AuthnRequestsSigned=XML_BOOL_NULL;
1483 m_WantAssertionsSigned=XML_BOOL_NULL;
1484 m_children.push_back(nullptr);
1485 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1486 ++m_pos_AssertionConsumerService;
1490 virtual ~SPSSODescriptorImpl() {}
1492 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1493 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1497 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1501 void _clone(const SPSSODescriptorImpl& src) {
1502 SSODescriptorTypeImpl::_clone(src);
1503 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1504 WantAssertionsSigned(src.m_WantAssertionsSigned);
1505 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1507 getAssertionConsumerServices().push_back((*i)->cloneAssertionConsumerService());
1510 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1512 getAttributeConsumingServices().push_back((*j)->cloneAttributeConsumingService());
1517 IMPL_XMLOBJECT_CLONE_EX(SPSSODescriptor);
1518 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1519 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1520 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1521 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1523 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1524 if (!qualifiedName.hasNamespaceURI()) {
1525 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1526 setAuthnRequestsSigned(value);
1529 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1530 setWantAssertionsSigned(value);
1534 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1538 void marshallAttributes(DOMElement* domElement) const {
1539 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1540 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1541 RoleDescriptorImpl::marshallAttributes(domElement);
1544 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1545 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1546 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1547 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1551 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1553 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1554 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1557 m_children.push_back(nullptr);
1558 m_children.push_back(nullptr);
1559 m_pos_AuthnQueryService=m_pos_ContactPerson;
1560 ++m_pos_AuthnQueryService;
1561 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1562 ++m_pos_AssertionIDRequestService;
1566 virtual ~AuthnAuthorityDescriptorImpl() {}
1568 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1569 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1573 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1577 void _clone(const AuthnAuthorityDescriptorImpl& src) {
1578 RoleDescriptorImpl::_clone(src);
1579 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1581 getAuthnQueryServices().push_back((*i)->cloneAuthnQueryService());
1584 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1586 getAssertionIDRequestServices().push_back((*j)->cloneAssertionIDRequestService());
1589 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1591 getNameIDFormats().push_back((*k)->cloneNameIDFormat());
1596 IMPL_XMLOBJECT_CLONE_EX(AuthnAuthorityDescriptor);
1597 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1598 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1599 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1602 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1603 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1604 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1605 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1606 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1610 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1612 list<XMLObject*>::iterator m_pos_AuthzService;
1613 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1616 m_children.push_back(nullptr);
1617 m_children.push_back(nullptr);
1618 m_pos_AuthzService=m_pos_ContactPerson;
1619 ++m_pos_AuthzService;
1620 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1621 ++m_pos_AssertionIDRequestService;
1625 virtual ~PDPDescriptorImpl() {}
1627 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1628 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1632 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1636 void _clone(const PDPDescriptorImpl& src) {
1637 RoleDescriptorImpl::_clone(src);
1638 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1640 getAuthzServices().push_back((*i)->cloneAuthzService());
1643 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1645 getAssertionIDRequestServices().push_back((*j)->cloneAssertionIDRequestService());
1648 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1650 getNameIDFormats().push_back((*k)->cloneNameIDFormat());
1655 IMPL_XMLOBJECT_CLONE_EX(PDPDescriptor);
1656 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1657 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1658 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1661 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1662 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1663 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1664 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1665 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1669 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1671 list<XMLObject*>::iterator m_pos_AttributeService;
1672 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1673 list<XMLObject*>::iterator m_pos_NameIDFormat;
1674 list<XMLObject*>::iterator m_pos_AttributeProfile;
1677 m_children.push_back(nullptr);
1678 m_children.push_back(nullptr);
1679 m_children.push_back(nullptr);
1680 m_children.push_back(nullptr);
1681 m_pos_AttributeService=m_pos_ContactPerson;
1682 ++m_pos_AttributeService;
1683 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1684 ++m_pos_AssertionIDRequestService;
1685 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1686 ++m_pos_NameIDFormat;
1687 m_pos_AttributeProfile=m_pos_NameIDFormat;
1688 ++m_pos_AttributeProfile;
1692 virtual ~AttributeAuthorityDescriptorImpl() {}
1694 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1695 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1699 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1703 void _clone(const AttributeAuthorityDescriptorImpl& src) {
1704 RoleDescriptorImpl::_clone(src);
1705 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1707 getAttributeServices().push_back((*i)->cloneAttributeService());
1710 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1712 getAssertionIDRequestServices().push_back((*j)->cloneAssertionIDRequestService());
1715 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1717 getNameIDFormats().push_back((*k)->cloneNameIDFormat());
1720 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1722 getAttributeProfiles().push_back((*m)->cloneAttributeProfile());
1725 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1727 getAttributes().push_back((*n)->cloneAttribute());
1732 IMPL_XMLOBJECT_CLONE_EX(AttributeAuthorityDescriptor);
1733 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1734 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1735 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1736 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1737 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1740 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1741 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1742 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1743 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1744 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1745 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1746 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1750 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1753 m_WantAssertionsSigned=XML_BOOL_NULL;
1754 m_children.push_back(nullptr);
1755 m_pos_NameIDFormat=m_pos_ContactPerson;
1756 ++m_pos_NameIDFormat;
1760 list<XMLObject*>::iterator m_pos_NameIDFormat;
1762 QueryDescriptorTypeImpl() {
1767 virtual ~QueryDescriptorTypeImpl() {}
1769 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1770 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1774 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1778 void _clone(const QueryDescriptorTypeImpl& src) {
1779 RoleDescriptorImpl::_clone(src);
1780 WantAssertionsSigned(src.m_WantAssertionsSigned);
1781 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1783 getNameIDFormats().push_back((*m)->cloneNameIDFormat());
1788 QueryDescriptorType* cloneQueryDescriptorType() const {
1789 return dynamic_cast<QueryDescriptorType*>(clone());
1792 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1793 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1795 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1796 if (!qualifiedName.hasNamespaceURI()) {
1797 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1798 setWantAssertionsSigned(value);
1802 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1806 void marshallAttributes(DOMElement* domElement) const {
1807 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1808 RoleDescriptorImpl::marshallAttributes(domElement);
1811 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1812 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1813 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1817 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1820 virtual ~AuthnQueryDescriptorTypeImpl() {}
1822 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1823 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1825 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1827 IMPL_XMLOBJECT_CLONE_EX(AuthnQueryDescriptorType);
1830 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1833 virtual ~AttributeQueryDescriptorTypeImpl() {}
1835 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1836 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1838 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1841 void _clone(const AttributeQueryDescriptorTypeImpl& src) {
1842 QueryDescriptorTypeImpl::_clone(src);
1843 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1845 getAttributeConsumingServices().push_back((*j)->cloneAttributeConsumingService());
1850 IMPL_XMLOBJECT_CLONE_EX(AttributeQueryDescriptorType);
1851 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1854 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1855 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1856 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1860 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1863 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1865 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1866 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1868 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1871 void _clone(const AuthzDecisionQueryDescriptorTypeImpl& src) {
1872 QueryDescriptorTypeImpl::_clone(src);
1873 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1875 getActionNamespaces().push_back((*j)->cloneActionNamespace());
1880 IMPL_XMLOBJECT_CLONE_EX(AuthzDecisionQueryDescriptorType);
1881 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1884 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1885 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1886 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1890 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1891 public virtual SignableObject,
1892 public AbstractComplexElement,
1893 public AbstractAttributeExtensibleXMLObject,
1894 public AbstractDOMCachingXMLObject,
1895 public AbstractXMLObjectMarshaller,
1896 public AbstractXMLObjectUnmarshaller
1898 list<XMLObject*>::iterator m_pos_AffiliateMember;
1901 m_ID=m_AffiliationOwnerID=nullptr;
1902 m_ValidUntil=m_CacheDuration=nullptr;
1903 m_children.push_back(nullptr);
1904 m_children.push_back(nullptr);
1905 m_children.push_back(nullptr);
1906 m_Signature=nullptr;
1907 m_Extensions=nullptr;
1908 m_pos_Signature=m_children.begin();
1909 m_pos_Extensions=m_pos_Signature;
1911 m_pos_AffiliateMember=m_pos_Extensions;
1912 ++m_pos_AffiliateMember;
1916 virtual ~AffiliationDescriptorImpl() {
1917 XMLString::release(&m_ID);
1918 XMLString::release(&m_AffiliationOwnerID);
1919 delete m_ValidUntil;
1920 delete m_CacheDuration;
1923 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1924 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1928 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1929 : AbstractXMLObject(src), AbstractComplexElement(src),
1930 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1933 setAffiliationOwnerID(src.getAffiliationOwnerID());
1934 setValidUntil(src.getValidUntil());
1935 setCacheDuration(src.getCacheDuration());
1936 if (src.getSignature())
1937 setSignature(src.getSignature()->cloneSignature());
1938 if (src.getExtensions())
1939 setExtensions(src.getExtensions()->cloneExtensions());
1941 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1943 getKeyDescriptors().push_back((*i)->cloneKeyDescriptor());
1946 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1948 getAffiliateMembers().push_back((*j)->cloneAffiliateMember());
1953 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1955 //IMPL_TYPED_CHILD(Signature);
1956 // Need customized setter.
1958 Signature* m_Signature;
1959 list<XMLObject*>::iterator m_pos_Signature;
1961 Signature* getSignature() const {
1965 void setSignature(Signature* sig) {
1966 prepareForAssignment(m_Signature,sig);
1967 *m_pos_Signature=m_Signature=sig;
1968 // Sync content reference back up.
1970 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1973 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1974 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1975 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1976 IMPL_DURATION_ATTRIB(CacheDuration,0);
1977 IMPL_TYPED_CHILD(Extensions);
1978 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1979 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1981 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1982 if (!qualifiedName.hasNamespaceURI()) {
1983 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1987 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1988 setAffiliationOwnerID(value);
1991 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1992 setValidUntil(value);
1995 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1996 setCacheDuration(value);
2000 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2004 void prepareForMarshalling() const {
2006 declareNonVisibleNamespaces();
2009 void marshallAttributes(DOMElement* domElement) const {
2010 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2011 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
2012 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2013 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2014 marshallExtensionAttributes(domElement);
2017 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2018 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2019 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2020 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2021 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2022 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2025 void processAttribute(const DOMAttr* attribute) {
2026 PROC_ID_ATTRIB(ID,ID,nullptr);
2027 unmarshallExtensionAttribute(attribute);
2031 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2032 public virtual SignableObject,
2033 public AbstractComplexElement,
2034 public AbstractAttributeExtensibleXMLObject,
2035 public AbstractDOMCachingXMLObject,
2036 public AbstractXMLObjectMarshaller,
2037 public AbstractXMLObjectUnmarshaller
2039 list<XMLObject*>::iterator m_pos_ContactPerson;
2042 m_ID=m_EntityID=nullptr;
2043 m_ValidUntil=m_CacheDuration=nullptr;
2044 m_children.push_back(nullptr);
2045 m_children.push_back(nullptr);
2046 m_children.push_back(nullptr);
2047 m_children.push_back(nullptr);
2048 m_children.push_back(nullptr);
2049 m_Signature=nullptr;
2050 m_Extensions=nullptr;
2051 m_AffiliationDescriptor=nullptr;
2052 m_Organization=nullptr;
2053 m_pos_Signature=m_children.begin();
2054 m_pos_Extensions=m_pos_Signature;
2056 m_pos_AffiliationDescriptor=m_pos_Extensions;
2057 ++m_pos_AffiliationDescriptor;
2058 m_pos_Organization=m_pos_AffiliationDescriptor;
2059 ++m_pos_Organization;
2060 m_pos_ContactPerson=m_pos_Organization;
2061 ++m_pos_ContactPerson;
2065 virtual ~EntityDescriptorImpl() {
2066 XMLString::release(&m_ID);
2067 XMLString::release(&m_EntityID);
2068 delete m_ValidUntil;
2069 delete m_CacheDuration;
2072 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2073 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2077 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2078 : AbstractXMLObject(src), AbstractComplexElement(src),
2079 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2082 setEntityID(src.getEntityID());
2083 setValidUntil(src.getValidUntil());
2084 setCacheDuration(src.getCacheDuration());
2085 if (src.getSignature())
2086 setSignature(src.getSignature()->cloneSignature());
2087 if (src.getExtensions())
2088 setExtensions(src.getExtensions()->cloneExtensions());
2089 if (src.getAffiliationDescriptor())
2090 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2091 if (src.getOrganization())
2092 setOrganization(src.getOrganization()->cloneOrganization());
2094 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2096 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2098 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2102 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2104 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2108 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2110 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2114 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2116 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2120 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2122 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2126 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2128 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2132 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2134 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2138 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2140 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2144 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2146 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2152 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2154 getContactPersons().push_back((*j)->cloneContactPerson());
2157 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2159 getAdditionalMetadataLocations().push_back((*k)->cloneAdditionalMetadataLocation());
2164 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2166 //IMPL_TYPED_CHILD(Signature);
2167 // Need customized setter.
2169 Signature* m_Signature;
2170 list<XMLObject*>::iterator m_pos_Signature;
2172 Signature* getSignature() const {
2176 void setSignature(Signature* sig) {
2177 prepareForAssignment(m_Signature,sig);
2178 *m_pos_Signature=m_Signature=sig;
2179 // Sync content reference back up.
2181 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2184 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2185 IMPL_STRING_ATTRIB(EntityID);
2186 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2187 IMPL_DURATION_ATTRIB(CacheDuration,0);
2188 IMPL_TYPED_CHILD(Extensions);
2189 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2190 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2191 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2192 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2193 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2194 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2195 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2196 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2197 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2198 IMPL_TYPED_CHILD(AffiliationDescriptor);
2199 IMPL_TYPED_CHILD(Organization);
2200 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2201 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2203 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2204 if (!qualifiedName.hasNamespaceURI()) {
2205 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2209 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2213 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2214 setValidUntil(value);
2217 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2218 setCacheDuration(value);
2222 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2225 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2226 // Check for "known" elements/types.
2227 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2228 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2229 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2230 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2231 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2232 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2233 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2234 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2235 if (qname == PDPDescriptor::ELEMENT_QNAME)
2236 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2237 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2238 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2239 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2240 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2241 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2242 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2244 vector<RoleDescriptor*>::const_iterator i =
2245 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2246 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2250 void prepareForMarshalling() const {
2252 declareNonVisibleNamespaces();
2255 void marshallAttributes(DOMElement* domElement) const {
2256 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2257 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2258 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2259 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2260 marshallExtensionAttributes(domElement);
2263 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2264 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2265 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2266 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2267 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2268 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2269 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2270 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2271 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2272 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2273 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2274 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2275 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2276 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2277 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2278 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2279 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2282 void processAttribute(const DOMAttr* attribute) {
2283 PROC_ID_ATTRIB(ID,ID,nullptr);
2284 unmarshallExtensionAttribute(attribute);
2288 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2289 public virtual SignableObject,
2290 public AbstractComplexElement,
2291 public AbstractDOMCachingXMLObject,
2292 public AbstractXMLObjectMarshaller,
2293 public AbstractXMLObjectUnmarshaller
2296 m_ID=m_Name=nullptr;
2297 m_ValidUntil=m_CacheDuration=nullptr;
2298 m_children.push_back(nullptr);
2299 m_children.push_back(nullptr);
2300 m_Signature=nullptr;
2301 m_Extensions=nullptr;
2302 m_pos_Signature=m_children.begin();
2303 m_pos_Extensions=m_pos_Signature;
2308 virtual ~EntitiesDescriptorImpl() {
2309 XMLString::release(&m_ID);
2310 XMLString::release(&m_Name);
2311 delete m_ValidUntil;
2312 delete m_CacheDuration;
2315 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2316 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2320 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2321 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2324 setName(src.getName());
2325 setValidUntil(src.getValidUntil());
2326 setCacheDuration(src.getCacheDuration());
2327 if (src.getSignature())
2328 setSignature(src.getSignature()->cloneSignature());
2329 if (src.getExtensions())
2330 setExtensions(src.getExtensions()->cloneExtensions());
2332 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2334 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2336 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2340 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2342 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2349 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2351 //IMPL_TYPED_CHILD(Signature);
2352 // Need customized setter.
2354 Signature* m_Signature;
2355 list<XMLObject*>::iterator m_pos_Signature;
2357 Signature* getSignature() const {
2361 void setSignature(Signature* sig) {
2362 prepareForAssignment(m_Signature,sig);
2363 *m_pos_Signature=m_Signature=sig;
2364 // Sync content reference back up.
2366 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2369 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2370 IMPL_STRING_ATTRIB(Name);
2371 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2372 IMPL_DURATION_ATTRIB(CacheDuration,0);
2373 IMPL_TYPED_CHILD(Extensions);
2374 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2375 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2378 void prepareForMarshalling() const {
2380 declareNonVisibleNamespaces();
2383 void marshallAttributes(DOMElement* domElement) const {
2384 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2385 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2386 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2387 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2390 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2391 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2392 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2393 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2394 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2395 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2398 void processAttribute(const DOMAttr* attribute) {
2399 PROC_ID_ATTRIB(ID,ID,nullptr);
2400 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2401 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2402 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2406 class SAML_DLLLOCAL DiscoveryResponseImpl : public virtual DiscoveryResponse, public IndexedEndpointTypeImpl
2409 virtual ~DiscoveryResponseImpl() {}
2411 DiscoveryResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2412 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2414 DiscoveryResponseImpl(const DiscoveryResponseImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
2416 IMPL_XMLOBJECT_CLONE_EX(DiscoveryResponse);
2419 class SAML_DLLLOCAL RequestInitiatorImpl : public virtual RequestInitiator, public EndpointTypeImpl
2422 virtual ~RequestInitiatorImpl() {}
2424 RequestInitiatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2425 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2427 RequestInitiatorImpl(const RequestInitiatorImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
2429 IMPL_XMLOBJECT_CLONE_EX(RequestInitiator);
2432 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2433 public AbstractComplexElement,
2434 public AbstractDOMCachingXMLObject,
2435 public AbstractXMLObjectMarshaller,
2436 public AbstractXMLObjectUnmarshaller
2439 virtual ~EntityAttributesImpl() {}
2441 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2442 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2445 EntityAttributesImpl(const EntityAttributesImpl& src)
2446 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2447 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2449 Attribute* a=dynamic_cast<Attribute*>(*i);
2451 getAttributes().push_back(a->cloneAttribute());
2455 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2457 getAssertions().push_back(as->cloneAssertion());
2464 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2465 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2466 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2469 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2470 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2471 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2472 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2476 class SAML_DLLLOCAL DigestMethodImpl : public virtual DigestMethod,
2477 public AbstractComplexElement,
2478 public AbstractDOMCachingXMLObject,
2479 public AbstractXMLObjectMarshaller,
2480 public AbstractXMLObjectUnmarshaller
2483 virtual ~DigestMethodImpl() {
2484 XMLString::release(&m_Algorithm);
2487 DigestMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2488 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Algorithm(nullptr) {
2491 DigestMethodImpl(const DigestMethodImpl& src)
2492 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_Algorithm(nullptr) {
2493 setAlgorithm(src.getAlgorithm());
2494 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) {
2496 getUnknownXMLObjects().push_back((*i)->clone());
2501 IMPL_XMLOBJECT_CLONE(DigestMethod);
2502 IMPL_STRING_ATTRIB(Algorithm);
2503 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2506 void marshallAttributes(DOMElement* domElement) const {
2507 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2510 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2512 getUnknownXMLObjects().push_back(childXMLObject);
2515 void processAttribute(const DOMAttr* attribute) {
2516 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2520 class SAML_DLLLOCAL SigningMethodImpl : public virtual SigningMethod,
2521 public AbstractComplexElement,
2522 public AbstractDOMCachingXMLObject,
2523 public AbstractXMLObjectMarshaller,
2524 public AbstractXMLObjectUnmarshaller
2527 m_Algorithm = m_MinKeySize = m_MaxKeySize = nullptr;
2531 virtual ~SigningMethodImpl() {
2532 XMLString::release(&m_Algorithm);
2533 XMLString::release(&m_MinKeySize);
2534 XMLString::release(&m_MaxKeySize);
2537 SigningMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2538 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2542 SigningMethodImpl(const SigningMethodImpl& src)
2543 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2545 setAlgorithm(src.getAlgorithm());
2546 setMinKeySize(src.m_MinKeySize);
2547 setMaxKeySize(src.m_MaxKeySize);
2548 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) {
2550 getUnknownXMLObjects().push_back((*i)->clone());
2555 IMPL_XMLOBJECT_CLONE(SigningMethod);
2556 IMPL_STRING_ATTRIB(Algorithm);
2557 IMPL_INTEGER_ATTRIB(MinKeySize);
2558 IMPL_INTEGER_ATTRIB(MaxKeySize);
2559 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2562 void marshallAttributes(DOMElement* domElement) const {
2563 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2564 MARSHALL_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2565 MARSHALL_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2568 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2570 getUnknownXMLObjects().push_back(childXMLObject);
2573 void processAttribute(const DOMAttr* attribute) {
2574 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2575 PROC_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2576 PROC_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2580 class SAML_DLLLOCAL DisplayNameImpl : public virtual DisplayName, public localizedNameTypeImpl
2583 virtual ~DisplayNameImpl() {}
2585 DisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2586 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2588 DisplayNameImpl(const DisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2590 IMPL_XMLOBJECT_CLONE_EX(DisplayName);
2593 class SAML_DLLLOCAL DescriptionImpl : public virtual Description, public localizedNameTypeImpl
2596 virtual ~DescriptionImpl() {}
2598 DescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2599 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2601 DescriptionImpl(const DescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2603 IMPL_XMLOBJECT_CLONE_EX(Description);
2606 class SAML_DLLLOCAL InformationURLImpl : public virtual InformationURL, public localizedURITypeImpl
2609 virtual ~InformationURLImpl() {}
2611 InformationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2612 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2614 InformationURLImpl(const InformationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2616 IMPL_XMLOBJECT_CLONE_EX(InformationURL);
2619 class SAML_DLLLOCAL PrivacyStatementURLImpl : public virtual PrivacyStatementURL, public localizedURITypeImpl
2622 virtual ~PrivacyStatementURLImpl() {}
2624 PrivacyStatementURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2625 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2627 PrivacyStatementURLImpl(const PrivacyStatementURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2629 IMPL_XMLOBJECT_CLONE_EX(PrivacyStatementURL);
2632 class SAML_DLLLOCAL KeywordsImpl : public virtual Keywords,
2633 public AbstractSimpleElement,
2634 public AbstractDOMCachingXMLObject,
2635 public AbstractXMLObjectMarshaller,
2636 public AbstractXMLObjectUnmarshaller
2640 m_LangPrefix=nullptr;
2649 virtual ~KeywordsImpl() {
2650 XMLString::release(&m_Lang);
2651 XMLString::release(&m_LangPrefix);
2654 KeywordsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2655 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2659 KeywordsImpl(const KeywordsImpl& src)
2660 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2662 setLang(src.getLang());
2663 if (src.m_LangPrefix)
2664 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
2667 IMPL_XMLOBJECT_CLONE(Keywords);
2668 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2671 void marshallAttributes(DOMElement* domElement) const {
2672 if (m_Lang && *m_Lang) {
2673 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2674 if (m_LangPrefix && *m_LangPrefix)
2675 attr->setPrefix(m_LangPrefix);
2677 attr->setPrefix(xmlconstants::XML_PREFIX);
2678 attr->setNodeValue(m_Lang);
2679 domElement->setAttributeNodeNS(attr);
2683 void processAttribute(const DOMAttr* attribute) {
2684 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2685 setLang(attribute->getValue());
2686 const XMLCh* temp = attribute->getPrefix();
2687 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2688 m_LangPrefix = XMLString::replicate(temp);
2691 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2695 class SAML_DLLLOCAL LogoImpl : public virtual Logo,
2696 public AbstractSimpleElement,
2697 public AbstractDOMCachingXMLObject,
2698 public AbstractXMLObjectMarshaller,
2699 public AbstractXMLObjectUnmarshaller
2703 m_LangPrefix=nullptr;
2714 virtual ~LogoImpl() {
2715 XMLString::release(&m_Lang);
2716 XMLString::release(&m_LangPrefix);
2717 XMLString::release(&m_Height);
2718 XMLString::release(&m_Width);
2721 LogoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2722 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2726 LogoImpl(const LogoImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2728 setLang(src.getLang());
2729 if (src.m_LangPrefix)
2730 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
2731 setHeight(src.m_Height);
2732 setWidth(src.m_Width);
2735 IMPL_XMLOBJECT_CLONE(Logo);
2736 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2737 IMPL_INTEGER_ATTRIB(Height);
2738 IMPL_INTEGER_ATTRIB(Width);
2741 void marshallAttributes(DOMElement* domElement) const {
2742 if (m_Lang && *m_Lang) {
2743 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2744 if (m_LangPrefix && *m_LangPrefix)
2745 attr->setPrefix(m_LangPrefix);
2747 attr->setPrefix(xmlconstants::XML_PREFIX);
2748 attr->setNodeValue(m_Lang);
2749 domElement->setAttributeNodeNS(attr);
2751 MARSHALL_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2752 MARSHALL_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2755 void processAttribute(const DOMAttr* attribute) {
2756 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2757 setLang(attribute->getValue());
2758 const XMLCh* temp = attribute->getPrefix();
2759 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2760 m_LangPrefix = XMLString::replicate(temp);
2763 PROC_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2764 PROC_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2765 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2769 class SAML_DLLLOCAL UIInfoImpl : public virtual UIInfo,
2770 public AbstractComplexElement,
2771 public AbstractDOMCachingXMLObject,
2772 public AbstractXMLObjectMarshaller,
2773 public AbstractXMLObjectUnmarshaller
2776 virtual ~UIInfoImpl() {}
2778 UIInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2779 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2782 UIInfoImpl(const UIInfoImpl& src)
2783 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2784 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2786 DisplayName* dn=dynamic_cast<DisplayName*>(*i);
2788 getDisplayNames().push_back(dn->cloneDisplayName());
2792 Description* des=dynamic_cast<Description*>(*i);
2794 getDescriptions().push_back(des->cloneDescription());
2798 Keywords* key=dynamic_cast<Keywords*>(*i);
2800 getKeywordss().push_back(key->cloneKeywords());
2804 Logo* logo=dynamic_cast<Logo*>(*i);
2806 getLogos().push_back(logo->cloneLogo());
2810 InformationURL* inf=dynamic_cast<InformationURL*>(*i);
2812 getInformationURLs().push_back(inf->cloneInformationURL());
2816 PrivacyStatementURL* priv=dynamic_cast<PrivacyStatementURL*>(*i);
2818 getPrivacyStatementURLs().push_back(priv->clonePrivacyStatementURL());
2823 getUnknownXMLObjects().push_back((*i)->clone());
2829 IMPL_XMLOBJECT_CLONE(UIInfo);
2830 IMPL_TYPED_CHILDREN(DisplayName,m_children.end());
2831 IMPL_TYPED_CHILDREN(Description,m_children.end());
2832 IMPL_TYPED_CHILDREN(Keywords,m_children.end());
2833 IMPL_TYPED_CHILDREN(Logo,m_children.end());
2834 IMPL_TYPED_CHILDREN(InformationURL,m_children.end());
2835 IMPL_TYPED_CHILDREN(PrivacyStatementURL,m_children.end());
2836 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2839 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2840 PROC_TYPED_CHILDREN(DisplayName,SAML20MD_UI_NS,false);
2841 PROC_TYPED_CHILDREN(Description,SAML20MD_UI_NS,false);
2842 PROC_TYPED_CHILDREN(Keywords,SAML20MD_UI_NS,false);
2843 PROC_TYPED_CHILDREN(Logo,SAML20MD_UI_NS,false);
2844 PROC_TYPED_CHILDREN(InformationURL,SAML20MD_UI_NS,false);
2845 PROC_TYPED_CHILDREN(PrivacyStatementURL,SAML20MD_UI_NS,false);
2848 const XMLCh* nsURI=root->getNamespaceURI();
2849 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2850 getUnknownXMLObjects().push_back(childXMLObject);
2854 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2858 class SAML_DLLLOCAL DiscoHintsImpl : public virtual DiscoHints,
2859 public AbstractComplexElement,
2860 public AbstractDOMCachingXMLObject,
2861 public AbstractXMLObjectMarshaller,
2862 public AbstractXMLObjectUnmarshaller
2865 virtual ~DiscoHintsImpl() {}
2867 DiscoHintsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2868 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2871 DiscoHintsImpl(const DiscoHintsImpl& src)
2872 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2873 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2875 IPHint* ip=dynamic_cast<IPHint*>(*i);
2877 getIPHints().push_back(ip->cloneIPHint());
2881 DomainHint* dom=dynamic_cast<DomainHint*>(*i);
2883 getDomainHints().push_back(dom->cloneDomainHint());
2887 GeolocationHint* geo=dynamic_cast<GeolocationHint*>(*i);
2889 getGeolocationHints().push_back(geo->cloneGeolocationHint());
2894 getUnknownXMLObjects().push_back((*i)->clone());
2900 IMPL_XMLOBJECT_CLONE(DiscoHints);
2901 IMPL_TYPED_CHILDREN(IPHint,m_children.end());
2902 IMPL_TYPED_CHILDREN(DomainHint,m_children.end());
2903 IMPL_TYPED_CHILDREN(GeolocationHint,m_children.end());
2904 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2907 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2908 PROC_TYPED_CHILDREN(IPHint,SAML20MD_UI_NS,false);
2909 PROC_TYPED_CHILDREN(DomainHint,SAML20MD_UI_NS,false);
2910 PROC_TYPED_CHILDREN(GeolocationHint,SAML20MD_UI_NS,false);
2913 const XMLCh* nsURI=root->getNamespaceURI();
2914 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2915 getUnknownXMLObjects().push_back(childXMLObject);
2919 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2926 #if defined (_MSC_VER)
2927 #pragma warning( pop )
2930 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2931 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2932 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2933 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2934 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2935 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2936 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2937 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2939 // Builder Implementations
2941 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2942 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2943 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2944 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2945 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2946 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2947 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2948 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2949 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2950 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2951 IMPL_XMLOBJECTBUILDER(AttributeService);
2952 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2953 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2954 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2955 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2956 IMPL_XMLOBJECTBUILDER(AuthzService);
2957 IMPL_XMLOBJECTBUILDER(Company);
2958 IMPL_XMLOBJECTBUILDER(ContactPerson);
2959 IMPL_XMLOBJECTBUILDER(EmailAddress);
2960 IMPL_XMLOBJECTBUILDER(EndpointType);
2961 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2962 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2963 IMPL_XMLOBJECTBUILDER(Extensions);
2964 IMPL_XMLOBJECTBUILDER(GivenName);
2965 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2966 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2967 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2968 IMPL_XMLOBJECTBUILDER(localizedNameType);
2969 IMPL_XMLOBJECTBUILDER(localizedURIType);
2970 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2971 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2972 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2973 IMPL_XMLOBJECTBUILDER(Organization);
2974 IMPL_XMLOBJECTBUILDER(OrganizationName);
2975 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2976 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2977 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2978 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2979 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2980 IMPL_XMLOBJECTBUILDER(ServiceName);
2981 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2982 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2983 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2984 IMPL_XMLOBJECTBUILDER(SurName);
2985 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2987 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2988 IMPL_XMLOBJECTBUILDER(SourceID);
2989 IMPL_XMLOBJECTBUILDER(DiscoveryResponse);
2990 IMPL_XMLOBJECTBUILDER(RequestInitiator);
2991 IMPL_XMLOBJECTBUILDER(EntityAttributes);
2992 IMPL_XMLOBJECTBUILDER(DigestMethod);
2993 IMPL_XMLOBJECTBUILDER(SigningMethod);
2994 IMPL_XMLOBJECTBUILDER(DisplayName);
2995 IMPL_XMLOBJECTBUILDER(Description);
2996 IMPL_XMLOBJECTBUILDER(Keywords);
2997 IMPL_XMLOBJECTBUILDER(Logo);
2998 IMPL_XMLOBJECTBUILDER(InformationURL);
2999 IMPL_XMLOBJECTBUILDER(PrivacyStatementURL);
3000 IMPL_XMLOBJECTBUILDER(UIInfo);
3001 IMPL_XMLOBJECTBUILDER(IPHint);
3002 IMPL_XMLOBJECTBUILDER(DomainHint);
3003 IMPL_XMLOBJECTBUILDER(GeolocationHint);
3004 IMPL_XMLOBJECTBUILDER(DiscoHints);
3006 #ifdef HAVE_COVARIANT_RETURNS
3007 RoleDescriptor* RoleDescriptorBuilder::buildObject(
3009 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
3011 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
3014 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
3017 const DigestMethod* RoleDescriptor::getDigestMethod() const
3019 bool roleLevel = false;
3020 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3022 if (getExtensions()) {
3023 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3024 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3025 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3027 if (dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3035 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3036 if (entity && entity->getExtensions()) {
3037 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3038 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3039 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3040 if (dm && dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3049 pair<const SigningMethod*,const Credential*> RoleDescriptor::getSigningMethod(const CredentialResolver& resolver, CredentialCriteria& cc) const
3051 bool roleLevel = false;
3052 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3054 if (getExtensions()) {
3055 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3056 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3057 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3060 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3061 cc.setXMLAlgorithm(sm->getAlgorithm());
3062 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3063 if (minsize.first || maxsize.first) {
3064 cc.setKeySize(minsize.first ? minsize.second : 0);
3065 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3069 cc.setMaxKeySize(0);
3071 const Credential* cred = resolver.resolve(&cc);
3073 return make_pair(sm, cred);
3080 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3081 if (entity && entity->getExtensions()) {
3082 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3083 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3084 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3086 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3087 cc.setXMLAlgorithm(sm->getAlgorithm());
3088 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3089 if (minsize.first || maxsize.first) {
3090 cc.setKeySize(minsize.first ? minsize.second : 0);
3091 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3095 cc.setMaxKeySize(0);
3097 const Credential* cred = resolver.resolve(&cc);
3099 return make_pair(sm, cred);
3107 cc.setMaxKeySize(0);
3108 cc.setXMLAlgorithm(nullptr);
3109 return pair<const SigningMethod*,const Credential*>(nullptr, resolver.resolve(&cc));
3112 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
3113 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);
3114 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);
3115 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
3116 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
3117 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);
3118 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);
3119 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3120 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);
3121 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);
3122 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);
3123 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);
3124 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);
3125 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);
3126 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);
3127 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);
3128 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3129 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3130 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
3131 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3132 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);
3133 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
3134 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);
3135 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);
3136 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3137 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);
3138 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);
3139 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3140 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);
3141 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
3142 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
3143 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
3144 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
3145 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
3146 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
3147 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
3148 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
3149 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
3150 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
3151 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
3152 const XMLCh Description::LOCAL_NAME[] = UNICODE_LITERAL_11(D,e,s,c,r,i,p,t,i,o,n);
3153 const XMLCh DigestMethod::LOCAL_NAME[] = UNICODE_LITERAL_12(D,i,g,e,s,t,M,e,t,h,o,d);
3154 const XMLCh DigestMethod::TYPE_NAME[] = UNICODE_LITERAL_16(D,i,g,e,s,t,M,e,t,h,o,d,T,y,p,e);
3155 const XMLCh DigestMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3156 const XMLCh DiscoHints::LOCAL_NAME[] = UNICODE_LITERAL_10(D,i,s,c,o,H,i,n,t,s);
3157 const XMLCh DiscoHints::TYPE_NAME[] = UNICODE_LITERAL_14(D,i,s,c,o,H,i,n,t,s,T,y,p,e);
3158 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);
3159 const XMLCh DisplayName::LOCAL_NAME[] = UNICODE_LITERAL_11(D,i,s,p,l,a,y,N,a,m,e);
3160 const XMLCh DomainHint::LOCAL_NAME[] = UNICODE_LITERAL_10(D,o,m,a,i,n,H,i,n,t);
3161 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
3162 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
3163 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
3164 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
3165 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
3166 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);
3167 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);
3168 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);
3169 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3170 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
3171 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
3172 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);
3173 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3174 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
3175 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
3176 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);
3177 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
3178 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
3179 const XMLCh GeolocationHint::LOCAL_NAME[] = UNICODE_LITERAL_15(G,e,o,l,o,c,a,t,i,o,n,H,i,n,t);
3180 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
3181 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3182 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);
3183 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);
3184 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
3185 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);
3186 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3187 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3188 const XMLCh InformationURL::LOCAL_NAME[] = UNICODE_LITERAL_14(I,n,f,o,r,m,a,t,i,o,n,U,R,L);
3189 const XMLCh IPHint::LOCAL_NAME[] = UNICODE_LITERAL_6(I,P,H,i,n,t);
3190 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
3191 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);
3192 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
3193 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
3194 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
3195 const XMLCh Keywords::LOCAL_NAME[] = UNICODE_LITERAL_8(K,e,y,w,o,r,d,s);
3196 const XMLCh Keywords::TYPE_NAME[] = UNICODE_LITERAL_12(K,e,y,w,o,r,d,s,T,y,p,e);
3197 const XMLCh Keywords::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3198 const XMLCh Logo::LOCAL_NAME[] = UNICODE_LITERAL_4(L,o,g,o);
3199 const XMLCh Logo::TYPE_NAME[] = UNICODE_LITERAL_8(L,o,g,o,T,y,p,e);
3200 const XMLCh Logo::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3201 const XMLCh Logo::HEIGHT_ATTRIB_NAME[] = UNICODE_LITERAL_6(h,e,i,g,h,t);
3202 const XMLCh Logo::WIDTH_ATTRIB_NAME[] = UNICODE_LITERAL_5(w,i,d,t,h);
3203 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
3204 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);
3205 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3206 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
3207 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
3208 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3209 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);
3210 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
3211 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);
3212 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
3213 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
3214 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
3215 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);
3216 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
3217 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
3218 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);
3219 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);
3220 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
3221 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);
3222 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);
3223 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);
3224 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);
3225 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
3226 const XMLCh RequestInitiator::LOCAL_NAME[] = UNICODE_LITERAL_16(R,e,q,u,e,s,t,I,n,i,t,i,a,t,o,r);
3227 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3228 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3229 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);
3230 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
3231 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);
3232 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
3233 const XMLCh SigningMethod::LOCAL_NAME[] = UNICODE_LITERAL_13(S,i,g,n,i,n,g,M,e,t,h,o,d);
3234 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);
3235 const XMLCh SigningMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3236 const XMLCh SigningMethod::MINKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,i,n,K,e,y,S,i,z,e);
3237 const XMLCh SigningMethod::MAXKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,a,x,K,e,y,S,i,z,e);
3238 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);
3239 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);
3240 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
3241 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3242 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);
3243 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);
3244 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);
3245 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
3246 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);
3247 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
3248 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
3249 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
3250 const XMLCh UIInfo::LOCAL_NAME[] = UNICODE_LITERAL_6(U,I,I,n,f,o);
3251 const XMLCh UIInfo::TYPE_NAME[] = UNICODE_LITERAL_10(U,I,I,n,f,o,T,y,p,e);