2 * Copyright 2001-2010 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for SAML 2.0 Metadata schema.
24 #include "exceptions.h"
25 #include "saml2/metadata/Metadata.h"
26 #include "signature/ContentReference.h"
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractSimpleElement.h>
30 #include <xmltooling/XMLToolingConfig.h>
31 #include <xmltooling/encryption/Encryption.h>
32 #include <xmltooling/impl/AnyElement.h>
33 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
34 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
35 #include <xmltooling/security/CredentialCriteria.h>
36 #include <xmltooling/security/CredentialResolver.h>
37 #include <xmltooling/signature/KeyInfo.h>
38 #include <xmltooling/signature/Signature.h>
39 #include <xmltooling/util/DateTime.h>
40 #include <xmltooling/util/XMLHelper.h>
43 #include <xercesc/util/XMLUniDefs.hpp>
44 #include <xsec/framework/XSECDefs.hpp>
46 using namespace samlconstants;
47 using namespace opensaml::saml2md;
48 using namespace opensaml::saml2;
49 using namespace xmlencryption;
50 using namespace xmlsignature;
51 using namespace xmltooling;
53 using xmlconstants::XMLSIG_NS;
54 using xmlconstants::XML_BOOL_NULL;
56 #if defined (_MSC_VER)
57 #pragma warning( push )
58 #pragma warning( disable : 4250 4251 )
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
65 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
66 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
67 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
68 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
69 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
70 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
71 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
73 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
74 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
75 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,IPHint);
76 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,DomainHint);
77 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GeolocationHint);
79 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
80 public AbstractSimpleElement,
81 public AbstractDOMCachingXMLObject,
82 public AbstractXMLObjectMarshaller,
83 public AbstractXMLObjectUnmarshaller
91 localizedNameTypeImpl() {
96 virtual ~localizedNameTypeImpl() {
97 XMLString::release(&m_Lang);
98 XMLString::release(&m_LangPrefix);
101 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
102 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
106 localizedNameTypeImpl(const localizedNameTypeImpl& src)
107 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
109 setLang(src.getLang());
110 if (src.m_LangPrefix)
111 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
114 IMPL_XMLOBJECT_CLONE(localizedNameType);
115 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
118 void marshallAttributes(DOMElement* domElement) const {
119 if (m_Lang && *m_Lang) {
120 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
121 if (m_LangPrefix && *m_LangPrefix)
122 attr->setPrefix(m_LangPrefix);
124 attr->setPrefix(xmlconstants::XML_PREFIX);
125 attr->setNodeValue(m_Lang);
126 domElement->setAttributeNodeNS(attr);
130 void processAttribute(const DOMAttr* attribute) {
131 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
132 setLang(attribute->getValue());
133 const XMLCh* temp = attribute->getPrefix();
134 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
135 m_LangPrefix = XMLString::replicate(temp);
138 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
142 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
143 public AbstractSimpleElement,
144 public AbstractDOMCachingXMLObject,
145 public AbstractXMLObjectMarshaller,
146 public AbstractXMLObjectUnmarshaller
150 m_LangPrefix=nullptr;
154 localizedURITypeImpl() {
159 virtual ~localizedURITypeImpl() {
160 XMLString::release(&m_Lang);
161 XMLString::release(&m_LangPrefix);
164 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
165 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
169 localizedURITypeImpl(const localizedURITypeImpl& src)
170 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
172 setLang(src.getLang());
173 if (src.m_LangPrefix)
174 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
177 IMPL_XMLOBJECT_CLONE(localizedURIType);
178 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
181 void marshallAttributes(DOMElement* domElement) const {
182 if (m_Lang && *m_Lang) {
183 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
184 if (m_LangPrefix && *m_LangPrefix)
185 attr->setPrefix(m_LangPrefix);
187 attr->setPrefix(xmlconstants::XML_PREFIX);
188 attr->setNodeValue(m_Lang);
189 domElement->setAttributeNodeNS(attr);
193 void processAttribute(const DOMAttr* attribute) {
194 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
195 setLang(attribute->getValue());
196 const XMLCh* temp = attribute->getPrefix();
197 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
198 m_LangPrefix = XMLString::replicate(temp);
201 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
205 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
208 virtual ~OrganizationNameImpl() {}
210 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
211 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
213 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
215 IMPL_XMLOBJECT_CLONE(OrganizationName);
216 localizedNameType* clonelocalizedNameType() const {
217 return new OrganizationNameImpl(*this);
221 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
224 virtual ~OrganizationDisplayNameImpl() {}
226 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
227 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
229 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
231 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
232 localizedNameType* clonelocalizedNameType() const {
233 return new OrganizationDisplayNameImpl(*this);
237 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
240 virtual ~OrganizationURLImpl() {}
242 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
243 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
245 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
247 IMPL_XMLOBJECT_CLONE(OrganizationURL);
248 localizedURIType* clonelocalizedURIType() const {
249 return new OrganizationURLImpl(*this);
253 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
256 virtual ~ServiceNameImpl() {}
258 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
259 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
261 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
263 IMPL_XMLOBJECT_CLONE(ServiceName);
264 localizedNameType* clonelocalizedNameType() const {
265 return new ServiceNameImpl(*this);
269 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
272 virtual ~ServiceDescriptionImpl() {}
274 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
275 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
277 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
279 IMPL_XMLOBJECT_CLONE(ServiceDescription);
280 localizedNameType* clonelocalizedNameType() const {
281 return new ServiceDescriptionImpl(*this);
285 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
286 public AbstractComplexElement,
287 public AbstractDOMCachingXMLObject,
288 public AbstractXMLObjectMarshaller,
289 public AbstractXMLObjectUnmarshaller
292 virtual ~ExtensionsImpl() {}
294 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
295 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
298 ExtensionsImpl(const ExtensionsImpl& src)
299 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
300 VectorOf(XMLObject) v=getUnknownXMLObjects();
301 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
302 v.push_back((*i)->clone());
305 IMPL_XMLOBJECT_CLONE(Extensions);
306 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
309 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
311 const XMLCh* nsURI=root->getNamespaceURI();
312 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
313 getUnknownXMLObjects().push_back(childXMLObject);
317 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
321 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
322 public AbstractComplexElement,
323 public AbstractAttributeExtensibleXMLObject,
324 public AbstractDOMCachingXMLObject,
325 public AbstractXMLObjectMarshaller,
326 public AbstractXMLObjectUnmarshaller
328 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
329 list<XMLObject*>::iterator m_pos_OrganizationURL;
332 m_children.push_back(nullptr);
333 m_children.push_back(nullptr);
334 m_children.push_back(nullptr);
335 m_Extensions=nullptr;
336 m_pos_Extensions=m_children.begin();
337 m_pos_OrganizationDisplayName=m_pos_Extensions;
338 ++m_pos_OrganizationDisplayName;
339 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
340 ++m_pos_OrganizationURL;
343 virtual ~OrganizationImpl() {}
345 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
346 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
350 OrganizationImpl(const OrganizationImpl& src)
351 : AbstractXMLObject(src), AbstractComplexElement(src),
352 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
354 if (src.getExtensions())
355 setExtensions(src.getExtensions()->cloneExtensions());
356 VectorOf(OrganizationName) v=getOrganizationNames();
357 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
359 v.push_back((*i)->cloneOrganizationName());
362 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
363 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
365 w.push_back((*j)->cloneOrganizationDisplayName());
368 VectorOf(OrganizationURL) x=getOrganizationURLs();
369 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
371 x.push_back((*k)->cloneOrganizationURL());
376 IMPL_XMLOBJECT_CLONE(Organization);
377 IMPL_TYPED_CHILD(Extensions);
378 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
379 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
380 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
383 void marshallAttributes(DOMElement* domElement) const {
384 marshallExtensionAttributes(domElement);
387 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
388 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
389 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
390 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
391 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
392 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
395 void processAttribute(const DOMAttr* attribute) {
396 unmarshallExtensionAttribute(attribute);
400 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
401 public AbstractComplexElement,
402 public AbstractAttributeExtensibleXMLObject,
403 public AbstractDOMCachingXMLObject,
404 public AbstractXMLObjectMarshaller,
405 public AbstractXMLObjectUnmarshaller
407 list<XMLObject*>::iterator m_pos_TelephoneNumber;
410 m_ContactType=nullptr;
411 m_children.push_back(nullptr);
412 m_children.push_back(nullptr);
413 m_children.push_back(nullptr);
414 m_children.push_back(nullptr);
415 m_children.push_back(nullptr);
416 m_Extensions=nullptr;
420 m_pos_Extensions=m_children.begin();
421 m_pos_Company=m_pos_Extensions;
423 m_pos_GivenName=m_pos_Company;
425 m_pos_SurName=m_pos_GivenName;
427 m_pos_TelephoneNumber=m_pos_SurName;
428 ++m_pos_TelephoneNumber;
431 virtual ~ContactPersonImpl() {
432 XMLString::release(&m_ContactType);
435 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
436 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
440 ContactPersonImpl(const ContactPersonImpl& src)
441 : AbstractXMLObject(src), AbstractComplexElement(src),
442 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
444 if (src.getExtensions())
445 setExtensions(src.getExtensions()->cloneExtensions());
446 if (src.getCompany())
447 setCompany(src.getCompany()->cloneCompany());
448 if (src.getGivenName())
449 setGivenName(src.getGivenName()->cloneGivenName());
450 if (src.getSurName())
451 setSurName(src.getSurName()->cloneSurName());
453 VectorOf(EmailAddress) v=getEmailAddresss();
454 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
456 v.push_back((*i)->cloneEmailAddress());
459 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
460 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
462 w.push_back((*j)->cloneTelephoneNumber());
467 IMPL_XMLOBJECT_CLONE(ContactPerson);
468 IMPL_STRING_ATTRIB(ContactType);
469 IMPL_TYPED_CHILD(Extensions);
470 IMPL_TYPED_CHILD(Company);
471 IMPL_TYPED_CHILD(GivenName);
472 IMPL_TYPED_CHILD(SurName);
473 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
474 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
476 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
477 if (!qualifiedName.hasNamespaceURI()) {
478 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
479 setContactType(value);
483 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
487 void marshallAttributes(DOMElement* domElement) const {
488 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
489 marshallExtensionAttributes(domElement);
492 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
493 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
494 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
495 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
496 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
497 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
498 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
499 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
502 void processAttribute(const DOMAttr* attribute) {
503 unmarshallExtensionAttribute(attribute);
507 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
508 public AbstractSimpleElement,
509 public AbstractDOMCachingXMLObject,
510 public AbstractXMLObjectMarshaller,
511 public AbstractXMLObjectUnmarshaller
518 virtual ~AdditionalMetadataLocationImpl() {
519 XMLString::release(&m_Namespace);
522 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
523 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
527 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
528 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
532 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
533 IMPL_STRING_ATTRIB(Namespace);
536 void marshallAttributes(DOMElement* domElement) const {
537 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
540 void processAttribute(const DOMAttr* attribute) {
541 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
542 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
546 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
547 public AbstractComplexElement,
548 public AbstractDOMCachingXMLObject,
549 public AbstractXMLObjectMarshaller,
550 public AbstractXMLObjectUnmarshaller
555 m_children.push_back(nullptr);
556 m_pos_KeyInfo=m_children.begin();
559 virtual ~KeyDescriptorImpl() {
560 XMLString::release(&m_Use);
563 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
564 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
568 KeyDescriptorImpl(const KeyDescriptorImpl& src)
569 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
571 setUse(src.getUse());
572 if (src.getKeyInfo())
573 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
574 VectorOf(EncryptionMethod) v=getEncryptionMethods();
575 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
577 v.push_back((*i)->cloneEncryptionMethod());
582 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
583 IMPL_STRING_ATTRIB(Use);
584 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
585 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
588 void marshallAttributes(DOMElement* domElement) const {
589 MARSHALL_STRING_ATTRIB(Use,USE,nullptr);
592 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
593 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
594 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
595 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
598 void processAttribute(const DOMAttr* attribute) {
599 PROC_STRING_ATTRIB(Use,USE,nullptr);
600 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
604 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
605 public AbstractAttributeExtensibleXMLObject,
606 public AbstractComplexElement,
607 public AbstractDOMCachingXMLObject,
608 public AbstractXMLObjectMarshaller,
609 public AbstractXMLObjectUnmarshaller
612 m_Binding=m_Location=m_ResponseLocation=nullptr;
621 virtual ~EndpointTypeImpl() {
622 XMLString::release(&m_Binding);
623 XMLString::release(&m_Location);
624 XMLString::release(&m_ResponseLocation);
627 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
628 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
631 EndpointTypeImpl(const EndpointTypeImpl& src)
632 : AbstractXMLObject(src),
633 AbstractAttributeExtensibleXMLObject(src),
634 AbstractComplexElement(src),
635 AbstractDOMCachingXMLObject(src) {
636 setBinding(src.getBinding());
637 setLocation(src.getLocation());
638 setResponseLocation(src.getResponseLocation());
639 VectorOf(XMLObject) v=getUnknownXMLObjects();
640 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
641 v.push_back((*i)->clone());
644 IMPL_XMLOBJECT_CLONE(EndpointType);
645 IMPL_STRING_ATTRIB(Binding);
646 IMPL_STRING_ATTRIB(Location);
647 IMPL_STRING_ATTRIB(ResponseLocation);
648 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
650 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
651 if (!qualifiedName.hasNamespaceURI()) {
652 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
656 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
660 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
661 setResponseLocation(value);
665 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
668 void marshallAttributes(DOMElement* domElement) const {
669 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
670 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
671 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
672 marshallExtensionAttributes(domElement);
675 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
677 const XMLCh* nsURI=root->getNamespaceURI();
678 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
679 getUnknownXMLObjects().push_back(childXMLObject);
682 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
685 void processAttribute(const DOMAttr* attribute) {
686 unmarshallExtensionAttribute(attribute);
690 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
694 m_isDefault=XML_BOOL_NULL;
698 IndexedEndpointTypeImpl() {
702 virtual ~IndexedEndpointTypeImpl() {
703 XMLString::release(&m_Index);
706 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
707 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
709 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
710 setIndex(src.m_Index);
711 isDefault(src.m_isDefault);
714 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
715 EndpointType* cloneEndpointType() const {
716 return new IndexedEndpointTypeImpl(*this);
719 IMPL_INTEGER_ATTRIB(Index);
720 IMPL_BOOLEAN_ATTRIB(isDefault);
722 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
723 if (!qualifiedName.hasNamespaceURI()) {
724 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
728 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
733 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
737 void marshallAttributes(DOMElement* domElement) const {
738 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
739 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
740 EndpointTypeImpl::marshallAttributes(domElement);
744 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
747 virtual ~ArtifactResolutionServiceImpl() {}
749 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
750 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
752 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
754 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
755 IndexedEndpointType* cloneIndexedEndpointType() const {
756 return new ArtifactResolutionServiceImpl(*this);
758 EndpointType* cloneEndpointType() const {
759 return new ArtifactResolutionServiceImpl(*this);
763 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
766 virtual ~SingleLogoutServiceImpl() {}
768 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
769 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
771 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
773 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
774 EndpointType* cloneEndpointType() const {
775 return new SingleLogoutServiceImpl(*this);
779 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
782 virtual ~ManageNameIDServiceImpl() {}
784 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
785 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
787 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
789 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
790 EndpointType* cloneEndpointType() const {
791 return new ManageNameIDServiceImpl(*this);
795 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
798 virtual ~SingleSignOnServiceImpl() {}
800 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
801 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
803 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
805 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
806 EndpointType* cloneEndpointType() const {
807 return new SingleSignOnServiceImpl(*this);
811 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
814 virtual ~NameIDMappingServiceImpl() {}
816 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
817 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
819 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
821 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
822 EndpointType* cloneEndpointType() const {
823 return new NameIDMappingServiceImpl(*this);
827 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
830 virtual ~AssertionIDRequestServiceImpl() {}
832 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
833 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
835 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
837 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
838 EndpointType* cloneEndpointType() const {
839 return new AssertionIDRequestServiceImpl(*this);
843 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
846 virtual ~AssertionConsumerServiceImpl() {}
848 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
849 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
851 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
853 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
854 EndpointType* cloneEndpointType() const {
855 return new AssertionConsumerServiceImpl(*this);
857 IndexedEndpointType* cloneIndexedEndpointType() const {
858 return new AssertionConsumerServiceImpl(*this);
862 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
865 virtual ~AuthnQueryServiceImpl() {}
867 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
868 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
870 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
872 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
873 EndpointType* cloneEndpointType() const {
874 return new AuthnQueryServiceImpl(*this);
878 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
881 virtual ~AuthzServiceImpl() {}
883 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
884 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
886 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
888 IMPL_XMLOBJECT_CLONE(AuthzService);
889 EndpointType* cloneEndpointType() const {
890 return new AuthzServiceImpl(*this);
894 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
897 virtual ~AttributeServiceImpl() {}
899 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
900 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
902 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
904 IMPL_XMLOBJECT_CLONE(AttributeService);
905 EndpointType* cloneEndpointType() const {
906 return new AttributeServiceImpl(*this);
910 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
911 public virtual SignableObject,
912 public AbstractComplexElement,
913 public AbstractAttributeExtensibleXMLObject,
914 public AbstractDOMCachingXMLObject,
915 public AbstractXMLObjectMarshaller,
916 public AbstractXMLObjectUnmarshaller
919 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
920 m_ValidUntil=m_CacheDuration=nullptr;
921 m_children.push_back(nullptr);
922 m_children.push_back(nullptr);
923 m_children.push_back(nullptr);
924 m_children.push_back(nullptr);
926 m_Extensions=nullptr;
927 m_Organization=nullptr;
928 m_pos_Signature=m_children.begin();
929 m_pos_Extensions=m_pos_Signature;
931 m_pos_Organization=m_pos_Extensions;
932 ++m_pos_Organization;
933 m_pos_ContactPerson=m_pos_Organization;
934 ++m_pos_ContactPerson;
938 list<XMLObject*>::iterator m_pos_ContactPerson;
940 RoleDescriptorImpl() {
945 virtual ~RoleDescriptorImpl() {
946 XMLString::release(&m_ID);
947 XMLString::release(&m_ProtocolSupportEnumeration);
948 XMLString::release(&m_ErrorURL);
950 delete m_CacheDuration;
953 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
954 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
958 RoleDescriptorImpl(const RoleDescriptorImpl& src)
959 : AbstractXMLObject(src), AbstractComplexElement(src),
960 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
963 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
964 setErrorURL(src.getErrorURL());
965 setValidUntil(src.getValidUntil());
966 setCacheDuration(src.getCacheDuration());
967 if (src.getSignature())
968 setSignature(src.getSignature()->cloneSignature());
969 if (src.getExtensions())
970 setExtensions(src.getExtensions()->cloneExtensions());
971 if (src.getOrganization())
972 setOrganization(src.getOrganization()->cloneOrganization());
974 VectorOf(KeyDescriptor) v=getKeyDescriptors();
975 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
977 v.push_back((*i)->cloneKeyDescriptor());
980 VectorOf(ContactPerson) w=getContactPersons();
981 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
983 w.push_back((*j)->cloneContactPerson());
988 //IMPL_TYPED_CHILD(Signature);
989 // Need customized setter.
991 Signature* m_Signature;
992 list<XMLObject*>::iterator m_pos_Signature;
994 Signature* getSignature() const {
998 void setSignature(Signature* sig) {
999 prepareForAssignment(m_Signature,sig);
1000 *m_pos_Signature=m_Signature=sig;
1001 // Sync content reference back up.
1003 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1006 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1007 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
1008 IMPL_STRING_ATTRIB(ErrorURL);
1009 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1010 IMPL_DURATION_ATTRIB(CacheDuration,0);
1011 IMPL_TYPED_CHILD(Extensions);
1012 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
1013 IMPL_TYPED_CHILD(Organization);
1014 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1016 bool hasSupport(const XMLCh* protocol) const {
1017 if (!protocol || !*protocol)
1019 if (m_ProtocolSupportEnumeration) {
1020 // Look for first character.
1021 xsecsize_t len=XMLString::stringLen(protocol);
1023 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1025 // Only possible match is if it's the first character or a space comes before it.
1026 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1027 // See if rest of protocol string is present.
1028 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1029 // Only possible match is if it's the last character or a space comes after it.
1030 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1036 // Move past last search and start again.
1041 // Move past last search and start again.
1044 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1050 void addSupport(const XMLCh* protocol) {
1051 if (hasSupport(protocol))
1053 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1054 #ifdef HAVE_GOOD_STL
1055 xstring pse(m_ProtocolSupportEnumeration);
1056 pse = pse + chSpace + protocol;
1057 setProtocolSupportEnumeration(pse.c_str());
1059 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1060 auto_ptr_char temp2(protocol);
1061 string pse(temp.get());
1062 pse = pse + ' ' + temp2.get();
1063 auto_ptr_XMLCh temp3(pse.c_str());
1064 setProtocolSupportEnumeration(temp3.get());
1068 setProtocolSupportEnumeration(protocol);
1072 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1073 if (!qualifiedName.hasNamespaceURI()) {
1074 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1078 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1079 setProtocolSupportEnumeration(value);
1082 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1086 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1087 setValidUntil(value);
1090 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1091 setCacheDuration(value);
1095 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1099 void prepareForMarshalling() const {
1101 declareNonVisibleNamespaces();
1104 void marshallAttributes(DOMElement* domElement) const {
1105 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1106 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
1107 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
1108 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1109 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1110 marshallExtensionAttributes(domElement);
1113 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1114 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1115 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1116 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1117 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1118 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1119 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1122 void processAttribute(const DOMAttr* attribute) {
1123 PROC_ID_ATTRIB(ID,ID,nullptr);
1124 unmarshallExtensionAttribute(attribute);
1128 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1131 virtual ~RoleDescriptorTypeImpl() {}
1133 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1134 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1137 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1138 VectorOf(XMLObject) v=getUnknownXMLObjects();
1139 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1140 v.push_back((*i)->clone());
1143 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1144 RoleDescriptor* cloneRoleDescriptor() const {
1145 return new RoleDescriptorTypeImpl(*this);
1148 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1151 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1152 getUnknownXMLObjects().push_back(childXMLObject);
1156 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1159 m_children.push_back(nullptr);
1160 m_children.push_back(nullptr);
1161 m_children.push_back(nullptr);
1162 m_children.push_back(nullptr);
1163 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1164 ++m_pos_ArtifactResolutionService;
1165 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1166 ++m_pos_SingleLogoutService;
1167 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1168 ++m_pos_ManageNameIDService;
1169 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1170 ++m_pos_NameIDFormat;
1174 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1175 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1176 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1177 list<XMLObject*>::iterator m_pos_NameIDFormat;
1179 SSODescriptorTypeImpl() {
1184 virtual ~SSODescriptorTypeImpl() {}
1186 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1187 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1191 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1193 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1194 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1196 v.push_back((*i)->cloneArtifactResolutionService());
1199 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1200 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1202 w.push_back((*j)->cloneSingleLogoutService());
1205 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1206 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1208 x.push_back((*k)->cloneManageNameIDService());
1211 VectorOf(NameIDFormat) y=getNameIDFormats();
1212 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1214 y.push_back((*m)->cloneNameIDFormat());
1219 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1220 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1221 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1222 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1225 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1226 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1227 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1228 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1229 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1230 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1234 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1236 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1237 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1238 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1239 list<XMLObject*>::iterator m_pos_AttributeProfile;
1242 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1243 m_children.push_back(nullptr);
1244 m_children.push_back(nullptr);
1245 m_children.push_back(nullptr);
1246 m_children.push_back(nullptr);
1247 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1248 ++m_pos_SingleSignOnService;
1249 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1250 ++m_pos_NameIDMappingService;
1251 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1252 ++m_pos_AssertionIDRequestService;
1253 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1254 ++m_pos_AttributeProfile;
1258 virtual ~IDPSSODescriptorImpl() {}
1260 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1261 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1265 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1267 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1268 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1269 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1271 v.push_back((*i)->cloneSingleSignOnService());
1274 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1275 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1277 w.push_back((*j)->cloneNameIDMappingService());
1280 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1281 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1283 x.push_back((*k)->cloneAssertionIDRequestService());
1286 VectorOf(AttributeProfile) y=getAttributeProfiles();
1287 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1289 y.push_back((*m)->cloneAttributeProfile());
1292 VectorOf(Attribute) z=getAttributes();
1293 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1295 z.push_back((*n)->cloneAttribute());
1300 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1301 SSODescriptorType* cloneSSODescriptorType() const {
1302 return new IDPSSODescriptorImpl(*this);
1304 RoleDescriptor* cloneRoleDescriptor() const {
1305 return new IDPSSODescriptorImpl(*this);
1308 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1309 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1310 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1311 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1312 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1313 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1315 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1316 if (!qualifiedName.hasNamespaceURI()) {
1317 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1318 setWantAuthnRequestsSigned(value);
1322 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1326 void marshallAttributes(DOMElement* domElement) const {
1327 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1328 RoleDescriptorImpl::marshallAttributes(domElement);
1331 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1332 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1333 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1334 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1335 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1336 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1337 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1341 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1342 public AbstractComplexElement,
1343 public AbstractAttributeExtensibleXMLObject,
1344 public AbstractDOMCachingXMLObject,
1345 public AbstractXMLObjectMarshaller,
1346 public AbstractXMLObjectUnmarshaller
1349 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1350 m_isRequired=XML_BOOL_NULL;
1353 virtual ~RequestedAttributeImpl() {
1354 XMLString::release(&m_Name);
1355 XMLString::release(&m_NameFormat);
1356 XMLString::release(&m_FriendlyName);
1359 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1360 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1364 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1365 : AbstractXMLObject(src), AbstractComplexElement(src),
1366 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1368 setName(src.getName());
1369 setNameFormat(src.getNameFormat());
1370 setFriendlyName(src.getFriendlyName());
1371 isRequired(src.m_isRequired);
1372 VectorOf(XMLObject) v=getAttributeValues();
1373 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1375 v.push_back((*i)->clone());
1380 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1381 Attribute* cloneAttribute() const {
1382 return new RequestedAttributeImpl(*this);
1385 IMPL_STRING_ATTRIB(Name);
1386 IMPL_STRING_ATTRIB(NameFormat);
1387 IMPL_STRING_ATTRIB(FriendlyName);
1388 IMPL_BOOLEAN_ATTRIB(isRequired);
1389 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1391 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1392 if (!qualifiedName.hasNamespaceURI()) {
1393 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1397 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1398 setNameFormat(value);
1401 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1402 setFriendlyName(value);
1405 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1406 setisRequired(value);
1410 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1414 void marshallAttributes(DOMElement* domElement) const {
1415 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1416 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1417 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1418 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1419 marshallExtensionAttributes(domElement);
1422 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1423 getAttributeValues().push_back(childXMLObject);
1426 void processAttribute(const DOMAttr* attribute) {
1427 unmarshallExtensionAttribute(attribute);
1431 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1432 public AbstractComplexElement,
1433 public AbstractDOMCachingXMLObject,
1434 public AbstractXMLObjectMarshaller,
1435 public AbstractXMLObjectUnmarshaller
1437 list<XMLObject*>::iterator m_pos_ServiceDescription;
1438 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1442 m_isDefault=XML_BOOL_NULL;
1443 m_children.push_back(nullptr);
1444 m_children.push_back(nullptr);
1445 m_pos_ServiceDescription=m_children.begin();
1446 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1447 ++m_pos_RequestedAttribute;
1451 virtual ~AttributeConsumingServiceImpl() {
1452 XMLString::release(&m_Index);
1455 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1456 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1460 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1461 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1463 setIndex(src.m_Index);
1464 isDefault(src.m_isDefault);
1465 VectorOf(ServiceName) v=getServiceNames();
1466 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1468 v.push_back((*i)->cloneServiceName());
1471 VectorOf(ServiceDescription) w=getServiceDescriptions();
1472 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1474 w.push_back((*j)->cloneServiceDescription());
1477 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1478 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1480 x.push_back((*k)->cloneRequestedAttribute());
1485 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1486 IMPL_INTEGER_ATTRIB(Index);
1487 IMPL_BOOLEAN_ATTRIB(isDefault);
1488 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1489 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1490 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1493 void marshallAttributes(DOMElement* domElement) const {
1494 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1495 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1498 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1499 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1500 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1501 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1502 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1505 void processAttribute(const DOMAttr* attribute) {
1506 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1507 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1508 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1512 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1514 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1517 m_AuthnRequestsSigned=XML_BOOL_NULL;
1518 m_WantAssertionsSigned=XML_BOOL_NULL;
1519 m_children.push_back(nullptr);
1520 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1521 ++m_pos_AssertionConsumerService;
1525 virtual ~SPSSODescriptorImpl() {}
1527 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1528 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1532 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1534 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1535 WantAssertionsSigned(src.m_WantAssertionsSigned);
1536 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1537 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1539 v.push_back((*i)->cloneAssertionConsumerService());
1542 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1543 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1545 w.push_back((*j)->cloneAttributeConsumingService());
1550 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1551 SSODescriptorType* cloneSSODescriptorType() const {
1552 return cloneSPSSODescriptor();
1554 RoleDescriptor* cloneRoleDescriptor() const {
1555 return cloneSPSSODescriptor();
1558 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1559 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1560 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1561 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1563 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1564 if (!qualifiedName.hasNamespaceURI()) {
1565 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1566 setAuthnRequestsSigned(value);
1569 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1570 setWantAssertionsSigned(value);
1574 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1578 void marshallAttributes(DOMElement* domElement) const {
1579 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1580 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1581 RoleDescriptorImpl::marshallAttributes(domElement);
1584 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1585 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1586 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1587 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1591 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1593 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1594 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1597 m_children.push_back(nullptr);
1598 m_children.push_back(nullptr);
1599 m_pos_AuthnQueryService=m_pos_ContactPerson;
1600 ++m_pos_AuthnQueryService;
1601 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1602 ++m_pos_AssertionIDRequestService;
1606 virtual ~AuthnAuthorityDescriptorImpl() {}
1608 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1609 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1613 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1615 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1616 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1618 v.push_back((*i)->cloneAuthnQueryService());
1621 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1622 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1624 w.push_back((*j)->cloneAssertionIDRequestService());
1627 VectorOf(NameIDFormat) x=getNameIDFormats();
1628 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1630 x.push_back((*k)->cloneNameIDFormat());
1635 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1636 RoleDescriptor* cloneRoleDescriptor() const {
1637 return cloneAuthnAuthorityDescriptor();
1640 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1641 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1642 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1645 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1646 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1647 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1648 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1649 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1653 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1655 list<XMLObject*>::iterator m_pos_AuthzService;
1656 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1659 m_children.push_back(nullptr);
1660 m_children.push_back(nullptr);
1661 m_pos_AuthzService=m_pos_ContactPerson;
1662 ++m_pos_AuthzService;
1663 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1664 ++m_pos_AssertionIDRequestService;
1668 virtual ~PDPDescriptorImpl() {}
1670 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1671 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1675 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1677 VectorOf(AuthzService) v=getAuthzServices();
1678 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1680 v.push_back((*i)->cloneAuthzService());
1683 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1684 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1686 w.push_back((*j)->cloneAssertionIDRequestService());
1689 VectorOf(NameIDFormat) x=getNameIDFormats();
1690 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1692 x.push_back((*k)->cloneNameIDFormat());
1697 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1698 RoleDescriptor* cloneRoleDescriptor() const {
1699 return clonePDPDescriptor();
1702 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1703 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1704 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1707 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1708 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1709 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1710 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1711 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1715 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1717 list<XMLObject*>::iterator m_pos_AttributeService;
1718 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1719 list<XMLObject*>::iterator m_pos_NameIDFormat;
1720 list<XMLObject*>::iterator m_pos_AttributeProfile;
1723 m_children.push_back(nullptr);
1724 m_children.push_back(nullptr);
1725 m_children.push_back(nullptr);
1726 m_children.push_back(nullptr);
1727 m_pos_AttributeService=m_pos_ContactPerson;
1728 ++m_pos_AttributeService;
1729 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1730 ++m_pos_AssertionIDRequestService;
1731 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1732 ++m_pos_NameIDFormat;
1733 m_pos_AttributeProfile=m_pos_NameIDFormat;
1734 ++m_pos_AttributeProfile;
1738 virtual ~AttributeAuthorityDescriptorImpl() {}
1740 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1741 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1745 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1747 VectorOf(AttributeService) v=getAttributeServices();
1748 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1750 v.push_back((*i)->cloneAttributeService());
1753 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1754 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1756 w.push_back((*j)->cloneAssertionIDRequestService());
1759 VectorOf(NameIDFormat) x=getNameIDFormats();
1760 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1762 x.push_back((*k)->cloneNameIDFormat());
1765 VectorOf(AttributeProfile) y=getAttributeProfiles();
1766 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1768 y.push_back((*m)->cloneAttributeProfile());
1771 VectorOf(Attribute) z=getAttributes();
1772 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1774 z.push_back((*n)->cloneAttribute());
1779 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1780 RoleDescriptor* cloneRoleDescriptor() const {
1781 return cloneAttributeAuthorityDescriptor();
1784 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1785 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1786 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1787 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1788 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1791 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1792 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1793 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1794 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1795 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1796 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1797 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1801 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1804 m_WantAssertionsSigned=XML_BOOL_NULL;
1805 m_children.push_back(nullptr);
1806 m_pos_NameIDFormat=m_pos_ContactPerson;
1807 ++m_pos_NameIDFormat;
1811 list<XMLObject*>::iterator m_pos_NameIDFormat;
1813 QueryDescriptorTypeImpl() {
1818 virtual ~QueryDescriptorTypeImpl() {}
1820 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1821 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1825 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1827 WantAssertionsSigned(src.m_WantAssertionsSigned);
1828 VectorOf(NameIDFormat) y=getNameIDFormats();
1829 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1831 y.push_back((*m)->cloneNameIDFormat());
1836 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1837 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1839 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1840 if (!qualifiedName.hasNamespaceURI()) {
1841 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1842 setWantAssertionsSigned(value);
1846 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1850 void marshallAttributes(DOMElement* domElement) const {
1851 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1852 RoleDescriptorImpl::marshallAttributes(domElement);
1855 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1856 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1857 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1861 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1864 virtual ~AuthnQueryDescriptorTypeImpl() {}
1866 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1867 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1869 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1871 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1872 QueryDescriptorType* cloneQueryDescriptorType() const {
1873 return new AuthnQueryDescriptorTypeImpl(*this);
1875 RoleDescriptor* cloneRoleDescriptor() const {
1876 return new AuthnQueryDescriptorTypeImpl(*this);
1880 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1883 virtual ~AttributeQueryDescriptorTypeImpl() {}
1885 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1886 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1888 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1889 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1890 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1891 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1893 w.push_back((*j)->cloneAttributeConsumingService());
1898 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1899 QueryDescriptorType* cloneQueryDescriptorType() const {
1900 return new AttributeQueryDescriptorTypeImpl(*this);
1902 RoleDescriptor* cloneRoleDescriptor() const {
1903 return new AttributeQueryDescriptorTypeImpl(*this);
1906 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1909 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1910 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1911 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1915 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1918 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1920 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1921 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1923 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1924 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1925 VectorOf(ActionNamespace) w=getActionNamespaces();
1926 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1928 w.push_back((*j)->cloneActionNamespace());
1933 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1934 QueryDescriptorType* cloneQueryDescriptorType() const {
1935 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1937 RoleDescriptor* cloneRoleDescriptor() const {
1938 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1941 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1944 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1945 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1946 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1950 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1951 public virtual SignableObject,
1952 public AbstractComplexElement,
1953 public AbstractAttributeExtensibleXMLObject,
1954 public AbstractDOMCachingXMLObject,
1955 public AbstractXMLObjectMarshaller,
1956 public AbstractXMLObjectUnmarshaller
1958 list<XMLObject*>::iterator m_pos_AffiliateMember;
1961 m_ID=m_AffiliationOwnerID=nullptr;
1962 m_ValidUntil=m_CacheDuration=nullptr;
1963 m_children.push_back(nullptr);
1964 m_children.push_back(nullptr);
1965 m_children.push_back(nullptr);
1966 m_Signature=nullptr;
1967 m_Extensions=nullptr;
1968 m_pos_Signature=m_children.begin();
1969 m_pos_Extensions=m_pos_Signature;
1971 m_pos_AffiliateMember=m_pos_Extensions;
1972 ++m_pos_AffiliateMember;
1976 virtual ~AffiliationDescriptorImpl() {
1977 XMLString::release(&m_ID);
1978 XMLString::release(&m_AffiliationOwnerID);
1979 delete m_ValidUntil;
1980 delete m_CacheDuration;
1983 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1984 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1988 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1989 : AbstractXMLObject(src), AbstractComplexElement(src),
1990 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1993 setAffiliationOwnerID(src.getAffiliationOwnerID());
1994 setValidUntil(src.getValidUntil());
1995 setCacheDuration(src.getCacheDuration());
1996 if (src.getSignature())
1997 setSignature(src.getSignature()->cloneSignature());
1998 if (src.getExtensions())
1999 setExtensions(src.getExtensions()->cloneExtensions());
2001 VectorOf(KeyDescriptor) v=getKeyDescriptors();
2002 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
2004 v.push_back((*i)->cloneKeyDescriptor());
2007 VectorOf(AffiliateMember) w=getAffiliateMembers();
2008 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
2010 w.push_back((*j)->cloneAffiliateMember());
2015 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
2017 //IMPL_TYPED_CHILD(Signature);
2018 // Need customized setter.
2020 Signature* m_Signature;
2021 list<XMLObject*>::iterator m_pos_Signature;
2023 Signature* getSignature() const {
2027 void setSignature(Signature* sig) {
2028 prepareForAssignment(m_Signature,sig);
2029 *m_pos_Signature=m_Signature=sig;
2030 // Sync content reference back up.
2032 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2035 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2036 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2037 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2038 IMPL_DURATION_ATTRIB(CacheDuration,0);
2039 IMPL_TYPED_CHILD(Extensions);
2040 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2041 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2043 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2044 if (!qualifiedName.hasNamespaceURI()) {
2045 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2049 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2050 setAffiliationOwnerID(value);
2053 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2054 setValidUntil(value);
2057 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2058 setCacheDuration(value);
2062 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2066 void prepareForMarshalling() const {
2068 declareNonVisibleNamespaces();
2071 void marshallAttributes(DOMElement* domElement) const {
2072 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2073 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
2074 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2075 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2076 marshallExtensionAttributes(domElement);
2079 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2080 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2081 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2082 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2083 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2084 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2087 void processAttribute(const DOMAttr* attribute) {
2088 PROC_ID_ATTRIB(ID,ID,nullptr);
2089 unmarshallExtensionAttribute(attribute);
2093 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2094 public virtual SignableObject,
2095 public AbstractComplexElement,
2096 public AbstractAttributeExtensibleXMLObject,
2097 public AbstractDOMCachingXMLObject,
2098 public AbstractXMLObjectMarshaller,
2099 public AbstractXMLObjectUnmarshaller
2101 list<XMLObject*>::iterator m_pos_ContactPerson;
2104 m_ID=m_EntityID=nullptr;
2105 m_ValidUntil=m_CacheDuration=nullptr;
2106 m_children.push_back(nullptr);
2107 m_children.push_back(nullptr);
2108 m_children.push_back(nullptr);
2109 m_children.push_back(nullptr);
2110 m_children.push_back(nullptr);
2111 m_Signature=nullptr;
2112 m_Extensions=nullptr;
2113 m_AffiliationDescriptor=nullptr;
2114 m_Organization=nullptr;
2115 m_pos_Signature=m_children.begin();
2116 m_pos_Extensions=m_pos_Signature;
2118 m_pos_AffiliationDescriptor=m_pos_Extensions;
2119 ++m_pos_AffiliationDescriptor;
2120 m_pos_Organization=m_pos_AffiliationDescriptor;
2121 ++m_pos_Organization;
2122 m_pos_ContactPerson=m_pos_Organization;
2123 ++m_pos_ContactPerson;
2127 virtual ~EntityDescriptorImpl() {
2128 XMLString::release(&m_ID);
2129 XMLString::release(&m_EntityID);
2130 delete m_ValidUntil;
2131 delete m_CacheDuration;
2134 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2135 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2139 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2140 : AbstractXMLObject(src), AbstractComplexElement(src),
2141 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2144 setEntityID(src.getEntityID());
2145 setValidUntil(src.getValidUntil());
2146 setCacheDuration(src.getCacheDuration());
2147 if (src.getSignature())
2148 setSignature(src.getSignature()->cloneSignature());
2149 if (src.getExtensions())
2150 setExtensions(src.getExtensions()->cloneExtensions());
2151 if (src.getAffiliationDescriptor())
2152 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2153 if (src.getOrganization())
2154 setOrganization(src.getOrganization()->cloneOrganization());
2156 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2158 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2160 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2164 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2166 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2170 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2172 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2176 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2178 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2182 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2184 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2188 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2190 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2194 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2196 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2200 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2202 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2206 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2208 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2214 VectorOf(ContactPerson) v=getContactPersons();
2215 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2217 v.push_back((*j)->cloneContactPerson());
2220 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2221 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2223 w.push_back((*k)->cloneAdditionalMetadataLocation());
2228 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2230 //IMPL_TYPED_CHILD(Signature);
2231 // Need customized setter.
2233 Signature* m_Signature;
2234 list<XMLObject*>::iterator m_pos_Signature;
2236 Signature* getSignature() const {
2240 void setSignature(Signature* sig) {
2241 prepareForAssignment(m_Signature,sig);
2242 *m_pos_Signature=m_Signature=sig;
2243 // Sync content reference back up.
2245 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2248 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2249 IMPL_STRING_ATTRIB(EntityID);
2250 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2251 IMPL_DURATION_ATTRIB(CacheDuration,0);
2252 IMPL_TYPED_CHILD(Extensions);
2253 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2254 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2255 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2256 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2257 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2258 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2259 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2260 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2261 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2262 IMPL_TYPED_CHILD(AffiliationDescriptor);
2263 IMPL_TYPED_CHILD(Organization);
2264 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2265 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2267 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2268 if (!qualifiedName.hasNamespaceURI()) {
2269 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2273 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2277 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2278 setValidUntil(value);
2281 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2282 setCacheDuration(value);
2286 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2289 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2290 // Check for "known" elements/types.
2291 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2292 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2293 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2294 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2295 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2296 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2297 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2298 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2299 if (qname == PDPDescriptor::ELEMENT_QNAME)
2300 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2301 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2302 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2303 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2304 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2305 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2306 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2308 vector<RoleDescriptor*>::const_iterator i =
2309 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2310 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2314 void prepareForMarshalling() const {
2316 declareNonVisibleNamespaces();
2319 void marshallAttributes(DOMElement* domElement) const {
2320 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2321 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2322 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2323 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2324 marshallExtensionAttributes(domElement);
2327 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2328 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2329 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2330 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2331 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2332 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2333 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2334 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2335 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2336 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2337 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2338 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2339 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2340 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2341 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2342 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2343 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2346 void processAttribute(const DOMAttr* attribute) {
2347 PROC_ID_ATTRIB(ID,ID,nullptr);
2348 unmarshallExtensionAttribute(attribute);
2352 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2353 public virtual SignableObject,
2354 public AbstractComplexElement,
2355 public AbstractDOMCachingXMLObject,
2356 public AbstractXMLObjectMarshaller,
2357 public AbstractXMLObjectUnmarshaller
2360 m_ID=m_Name=nullptr;
2361 m_ValidUntil=m_CacheDuration=nullptr;
2362 m_children.push_back(nullptr);
2363 m_children.push_back(nullptr);
2364 m_Signature=nullptr;
2365 m_Extensions=nullptr;
2366 m_pos_Signature=m_children.begin();
2367 m_pos_Extensions=m_pos_Signature;
2372 virtual ~EntitiesDescriptorImpl() {
2373 XMLString::release(&m_ID);
2374 XMLString::release(&m_Name);
2375 delete m_ValidUntil;
2376 delete m_CacheDuration;
2379 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2380 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2384 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2385 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2388 setName(src.getName());
2389 setValidUntil(src.getValidUntil());
2390 setCacheDuration(src.getCacheDuration());
2391 if (src.getSignature())
2392 setSignature(src.getSignature()->cloneSignature());
2393 if (src.getExtensions())
2394 setExtensions(src.getExtensions()->cloneExtensions());
2396 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2398 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2400 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2404 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2406 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2413 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2415 //IMPL_TYPED_CHILD(Signature);
2416 // Need customized setter.
2418 Signature* m_Signature;
2419 list<XMLObject*>::iterator m_pos_Signature;
2421 Signature* getSignature() const {
2425 void setSignature(Signature* sig) {
2426 prepareForAssignment(m_Signature,sig);
2427 *m_pos_Signature=m_Signature=sig;
2428 // Sync content reference back up.
2430 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2433 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2434 IMPL_STRING_ATTRIB(Name);
2435 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2436 IMPL_DURATION_ATTRIB(CacheDuration,0);
2437 IMPL_TYPED_CHILD(Extensions);
2438 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2439 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2442 void prepareForMarshalling() const {
2444 declareNonVisibleNamespaces();
2447 void marshallAttributes(DOMElement* domElement) const {
2448 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2449 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2450 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2451 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2454 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2455 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2456 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2457 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2458 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2459 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2462 void processAttribute(const DOMAttr* attribute) {
2463 PROC_ID_ATTRIB(ID,ID,nullptr);
2464 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2465 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2466 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2470 class SAML_DLLLOCAL DiscoveryResponseImpl : public virtual DiscoveryResponse, public IndexedEndpointTypeImpl
2473 virtual ~DiscoveryResponseImpl() {}
2475 DiscoveryResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2476 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2478 DiscoveryResponseImpl(const DiscoveryResponseImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
2480 IMPL_XMLOBJECT_CLONE(DiscoveryResponse);
2481 IndexedEndpointType* cloneIndexedEndpointType() const {
2482 return new DiscoveryResponseImpl(*this);
2484 EndpointType* cloneEndpointType() const {
2485 return new DiscoveryResponseImpl(*this);
2489 class SAML_DLLLOCAL RequestInitiatorImpl : public virtual RequestInitiator, public EndpointTypeImpl
2492 virtual ~RequestInitiatorImpl() {}
2494 RequestInitiatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2495 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2497 RequestInitiatorImpl(const RequestInitiatorImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
2499 IMPL_XMLOBJECT_CLONE(RequestInitiator);
2500 EndpointType* cloneEndpointType() const {
2501 return new RequestInitiatorImpl(*this);
2505 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2506 public AbstractComplexElement,
2507 public AbstractDOMCachingXMLObject,
2508 public AbstractXMLObjectMarshaller,
2509 public AbstractXMLObjectUnmarshaller
2512 virtual ~EntityAttributesImpl() {}
2514 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2515 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2518 EntityAttributesImpl(const EntityAttributesImpl& src)
2519 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2520 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2522 Attribute* a=dynamic_cast<Attribute*>(*i);
2524 getAttributes().push_back(a->cloneAttribute());
2528 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2530 getAssertions().push_back(as->cloneAssertion());
2537 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2539 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2540 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2543 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2544 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2545 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2546 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2550 class SAML_DLLLOCAL DigestMethodImpl : public virtual DigestMethod,
2551 public AbstractComplexElement,
2552 public AbstractDOMCachingXMLObject,
2553 public AbstractXMLObjectMarshaller,
2554 public AbstractXMLObjectUnmarshaller
2557 virtual ~DigestMethodImpl() {
2558 XMLString::release(&m_Algorithm);
2561 DigestMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2562 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2563 m_Algorithm = nullptr;
2566 DigestMethodImpl(const DigestMethodImpl& src)
2567 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2568 setAlgorithm(src.getAlgorithm());
2569 VectorOf(XMLObject) v=getUnknownXMLObjects();
2570 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
2571 v.push_back((*i)->clone());
2574 IMPL_STRING_ATTRIB(Algorithm);
2576 IMPL_XMLOBJECT_CLONE(DigestMethod);
2577 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2580 void marshallAttributes(DOMElement* domElement) const {
2581 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2584 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2586 getUnknownXMLObjects().push_back(childXMLObject);
2589 void processAttribute(const DOMAttr* attribute) {
2590 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2594 class SAML_DLLLOCAL SigningMethodImpl : public virtual SigningMethod,
2595 public AbstractComplexElement,
2596 public AbstractDOMCachingXMLObject,
2597 public AbstractXMLObjectMarshaller,
2598 public AbstractXMLObjectUnmarshaller
2601 virtual ~SigningMethodImpl() {
2602 XMLString::release(&m_Algorithm);
2603 XMLString::release(&m_MinKeySize);
2604 XMLString::release(&m_MaxKeySize);
2607 SigningMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2608 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2609 m_Algorithm = nullptr;
2610 m_MinKeySize = nullptr;
2611 m_MaxKeySize = nullptr;
2614 SigningMethodImpl(const SigningMethodImpl& src)
2615 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2616 setAlgorithm(src.getAlgorithm());
2617 setMinKeySize(src.m_MinKeySize);
2618 setMaxKeySize(src.m_MaxKeySize);
2619 VectorOf(XMLObject) v=getUnknownXMLObjects();
2620 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
2621 v.push_back((*i)->clone());
2624 IMPL_XMLOBJECT_CLONE(SigningMethod);
2625 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2627 IMPL_STRING_ATTRIB(Algorithm);
2628 IMPL_INTEGER_ATTRIB(MinKeySize);
2629 IMPL_INTEGER_ATTRIB(MaxKeySize);
2632 void marshallAttributes(DOMElement* domElement) const {
2633 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2634 MARSHALL_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2635 MARSHALL_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2638 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2640 getUnknownXMLObjects().push_back(childXMLObject);
2643 void processAttribute(const DOMAttr* attribute) {
2644 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2645 PROC_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2646 PROC_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2650 class SAML_DLLLOCAL DisplayNameImpl : public virtual DisplayName, public localizedNameTypeImpl
2653 virtual ~DisplayNameImpl() {}
2655 DisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2656 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2658 DisplayNameImpl(const DisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2660 IMPL_XMLOBJECT_CLONE(DisplayName);
2661 localizedNameType* clonelocalizedNameType() const {
2662 return new DisplayNameImpl(*this);
2666 class SAML_DLLLOCAL DescriptionImpl : public virtual Description, public localizedNameTypeImpl
2669 virtual ~DescriptionImpl() {}
2671 DescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2672 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2674 DescriptionImpl(const DescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2676 IMPL_XMLOBJECT_CLONE(Description);
2677 localizedNameType* clonelocalizedNameType() const {
2678 return new DescriptionImpl(*this);
2682 class SAML_DLLLOCAL InformationURLImpl : public virtual InformationURL, public localizedURITypeImpl
2685 virtual ~InformationURLImpl() {}
2687 InformationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2688 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2690 InformationURLImpl(const InformationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2692 IMPL_XMLOBJECT_CLONE(InformationURL);
2693 localizedURIType* clonelocalizedURIType() const {
2694 return new InformationURLImpl(*this);
2698 class SAML_DLLLOCAL PrivacyStatementURLImpl : public virtual PrivacyStatementURL, public localizedURITypeImpl
2701 virtual ~PrivacyStatementURLImpl() {}
2703 PrivacyStatementURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2704 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2706 PrivacyStatementURLImpl(const PrivacyStatementURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2708 IMPL_XMLOBJECT_CLONE(PrivacyStatementURL);
2709 localizedURIType* clonelocalizedURIType() const {
2710 return new PrivacyStatementURLImpl(*this);
2714 class SAML_DLLLOCAL LogoImpl : public virtual Logo,
2715 public AbstractSimpleElement,
2716 public AbstractDOMCachingXMLObject,
2717 public AbstractXMLObjectMarshaller,
2718 public AbstractXMLObjectUnmarshaller
2722 m_LangPrefix=nullptr;
2733 virtual ~LogoImpl() {
2734 XMLString::release(&m_Lang);
2735 XMLString::release(&m_LangPrefix);
2736 XMLString::release(&m_Height);
2737 XMLString::release(&m_Width);
2740 LogoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2741 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2745 LogoImpl(const LogoImpl& src)
2746 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2748 setLang(src.getLang());
2749 if (src.m_LangPrefix)
2750 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
2751 setHeight(src.m_Height);
2752 setWidth(src.m_Width);
2755 IMPL_XMLOBJECT_CLONE(Logo);
2756 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2757 IMPL_INTEGER_ATTRIB(Height);
2758 IMPL_INTEGER_ATTRIB(Width);
2761 void marshallAttributes(DOMElement* domElement) const {
2762 if (m_Lang && *m_Lang) {
2763 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2764 if (m_LangPrefix && *m_LangPrefix)
2765 attr->setPrefix(m_LangPrefix);
2767 attr->setPrefix(xmlconstants::XML_PREFIX);
2768 attr->setNodeValue(m_Lang);
2769 domElement->setAttributeNodeNS(attr);
2771 MARSHALL_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2772 MARSHALL_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2775 void processAttribute(const DOMAttr* attribute) {
2776 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2777 setLang(attribute->getValue());
2778 const XMLCh* temp = attribute->getPrefix();
2779 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2780 m_LangPrefix = XMLString::replicate(temp);
2783 PROC_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2784 PROC_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2785 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2789 class SAML_DLLLOCAL UIInfoImpl : public virtual UIInfo,
2790 public AbstractComplexElement,
2791 public AbstractDOMCachingXMLObject,
2792 public AbstractXMLObjectMarshaller,
2793 public AbstractXMLObjectUnmarshaller
2796 virtual ~UIInfoImpl() {}
2798 UIInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2799 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2802 UIInfoImpl(const UIInfoImpl& src)
2803 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2804 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2806 DisplayName* dn=dynamic_cast<DisplayName*>(*i);
2808 getDisplayNames().push_back(dn->cloneDisplayName());
2812 Description* des=dynamic_cast<Description*>(*i);
2814 getDescriptions().push_back(des->cloneDescription());
2818 Logo* logo=dynamic_cast<Logo*>(*i);
2820 getLogos().push_back(logo->cloneLogo());
2824 InformationURL* inf=dynamic_cast<InformationURL*>(*i);
2826 getInformationURLs().push_back(inf->cloneInformationURL());
2830 PrivacyStatementURL* priv=dynamic_cast<PrivacyStatementURL*>(*i);
2832 getPrivacyStatementURLs().push_back(priv->clonePrivacyStatementURL());
2836 getUnknownXMLObjects().push_back((*i)->clone());
2841 IMPL_XMLOBJECT_CLONE(UIInfo);
2842 IMPL_TYPED_CHILDREN(DisplayName,m_children.end());
2843 IMPL_TYPED_CHILDREN(Description,m_children.end());
2844 IMPL_TYPED_CHILDREN(Logo,m_children.end());
2845 IMPL_TYPED_CHILDREN(InformationURL,m_children.end());
2846 IMPL_TYPED_CHILDREN(PrivacyStatementURL,m_children.end());
2847 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2850 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2851 PROC_TYPED_CHILDREN(DisplayName,SAML20MD_UI_NS,false);
2852 PROC_TYPED_CHILDREN(Description,SAML20MD_UI_NS,false);
2853 PROC_TYPED_CHILDREN(Logo,SAML20MD_UI_NS,false);
2854 PROC_TYPED_CHILDREN(InformationURL,SAML20MD_UI_NS,false);
2855 PROC_TYPED_CHILDREN(PrivacyStatementURL,SAML20MD_UI_NS,false);
2858 const XMLCh* nsURI=root->getNamespaceURI();
2859 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2860 getUnknownXMLObjects().push_back(childXMLObject);
2864 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2868 class SAML_DLLLOCAL DiscoHintsImpl : public virtual DiscoHints,
2869 public AbstractComplexElement,
2870 public AbstractDOMCachingXMLObject,
2871 public AbstractXMLObjectMarshaller,
2872 public AbstractXMLObjectUnmarshaller
2875 virtual ~DiscoHintsImpl() {}
2877 DiscoHintsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2878 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2881 DiscoHintsImpl(const DiscoHintsImpl& src)
2882 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2883 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2885 IPHint* ip=dynamic_cast<IPHint*>(*i);
2887 getIPHints().push_back(ip->cloneIPHint());
2891 DomainHint* dom=dynamic_cast<DomainHint*>(*i);
2893 getDomainHints().push_back(dom->cloneDomainHint());
2897 GeolocationHint* geo=dynamic_cast<GeolocationHint*>(*i);
2899 getGeolocationHints().push_back(geo->cloneGeolocationHint());
2903 getUnknownXMLObjects().push_back((*i)->clone());
2908 IMPL_XMLOBJECT_CLONE(DiscoHints);
2909 IMPL_TYPED_CHILDREN(IPHint,m_children.end());
2910 IMPL_TYPED_CHILDREN(DomainHint,m_children.end());
2911 IMPL_TYPED_CHILDREN(GeolocationHint,m_children.end());
2912 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2915 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2916 PROC_TYPED_CHILDREN(IPHint,SAML20MD_UI_NS,false);
2917 PROC_TYPED_CHILDREN(DomainHint,SAML20MD_UI_NS,false);
2918 PROC_TYPED_CHILDREN(GeolocationHint,SAML20MD_UI_NS,false);
2921 const XMLCh* nsURI=root->getNamespaceURI();
2922 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2923 getUnknownXMLObjects().push_back(childXMLObject);
2927 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2934 #if defined (_MSC_VER)
2935 #pragma warning( pop )
2938 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2939 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2940 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2941 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2942 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2943 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2944 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2945 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2947 // Builder Implementations
2949 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2950 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2951 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2952 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2953 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2954 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2955 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2956 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2957 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2958 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2959 IMPL_XMLOBJECTBUILDER(AttributeService);
2960 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2961 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2962 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2963 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2964 IMPL_XMLOBJECTBUILDER(AuthzService);
2965 IMPL_XMLOBJECTBUILDER(Company);
2966 IMPL_XMLOBJECTBUILDER(ContactPerson);
2967 IMPL_XMLOBJECTBUILDER(EmailAddress);
2968 IMPL_XMLOBJECTBUILDER(EndpointType);
2969 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2970 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2971 IMPL_XMLOBJECTBUILDER(Extensions);
2972 IMPL_XMLOBJECTBUILDER(GivenName);
2973 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2974 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2975 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2976 IMPL_XMLOBJECTBUILDER(localizedNameType);
2977 IMPL_XMLOBJECTBUILDER(localizedURIType);
2978 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2979 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2980 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2981 IMPL_XMLOBJECTBUILDER(Organization);
2982 IMPL_XMLOBJECTBUILDER(OrganizationName);
2983 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2984 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2985 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2986 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2987 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2988 IMPL_XMLOBJECTBUILDER(ServiceName);
2989 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2990 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2991 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2992 IMPL_XMLOBJECTBUILDER(SurName);
2993 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2995 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2996 IMPL_XMLOBJECTBUILDER(SourceID);
2997 IMPL_XMLOBJECTBUILDER(DiscoveryResponse);
2998 IMPL_XMLOBJECTBUILDER(RequestInitiator);
2999 IMPL_XMLOBJECTBUILDER(EntityAttributes);
3000 IMPL_XMLOBJECTBUILDER(DigestMethod);
3001 IMPL_XMLOBJECTBUILDER(SigningMethod);
3002 IMPL_XMLOBJECTBUILDER(DisplayName);
3003 IMPL_XMLOBJECTBUILDER(Description);
3004 IMPL_XMLOBJECTBUILDER(Logo);
3005 IMPL_XMLOBJECTBUILDER(InformationURL);
3006 IMPL_XMLOBJECTBUILDER(PrivacyStatementURL);
3007 IMPL_XMLOBJECTBUILDER(UIInfo);
3008 IMPL_XMLOBJECTBUILDER(IPHint);
3009 IMPL_XMLOBJECTBUILDER(DomainHint);
3010 IMPL_XMLOBJECTBUILDER(GeolocationHint);
3011 IMPL_XMLOBJECTBUILDER(DiscoHints);
3013 #ifdef HAVE_COVARIANT_RETURNS
3014 RoleDescriptor* RoleDescriptorBuilder::buildObject(
3016 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
3018 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
3021 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
3024 const DigestMethod* RoleDescriptor::getDigestMethod() const
3026 bool roleLevel = false;
3027 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3029 if (getExtensions()) {
3030 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3031 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3032 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3034 if (dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3042 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3043 if (entity && entity->getExtensions()) {
3044 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3045 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3046 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3047 if (dm && dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3056 pair<const SigningMethod*,const Credential*> RoleDescriptor::getSigningMethod(const CredentialResolver& resolver, CredentialCriteria& cc) const
3058 bool roleLevel = false;
3059 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3061 if (getExtensions()) {
3062 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3063 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3064 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3067 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3068 cc.setXMLAlgorithm(sm->getAlgorithm());
3069 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3070 if (minsize.first || maxsize.first) {
3071 cc.setKeySize(minsize.first ? minsize.second : 0);
3072 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3076 cc.setMaxKeySize(0);
3078 const Credential* cred = resolver.resolve(&cc);
3080 return make_pair(sm, cred);
3087 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3088 if (entity && entity->getExtensions()) {
3089 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3090 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3091 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3093 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3094 cc.setXMLAlgorithm(sm->getAlgorithm());
3095 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3096 if (minsize.first || maxsize.first) {
3097 cc.setKeySize(minsize.first ? minsize.second : 0);
3098 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3102 cc.setMaxKeySize(0);
3104 const Credential* cred = resolver.resolve(&cc);
3106 return make_pair(sm, cred);
3114 cc.setMaxKeySize(0);
3115 cc.setXMLAlgorithm(nullptr);
3116 return pair<const SigningMethod*,const Credential*>(nullptr, resolver.resolve(&cc));
3119 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
3120 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);
3121 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);
3122 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
3123 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
3124 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);
3125 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);
3126 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3127 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);
3128 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);
3129 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);
3130 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);
3131 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);
3132 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);
3133 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);
3134 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);
3135 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3136 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3137 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
3138 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3139 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);
3140 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
3141 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);
3142 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);
3143 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3144 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);
3145 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);
3146 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3147 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);
3148 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
3149 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
3150 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
3151 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
3152 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
3153 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
3154 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
3155 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
3156 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
3157 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
3158 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
3159 const XMLCh Description::LOCAL_NAME[] = UNICODE_LITERAL_11(D,e,s,c,r,i,p,t,i,o,n);
3160 const XMLCh DigestMethod::LOCAL_NAME[] = UNICODE_LITERAL_12(D,i,g,e,s,t,M,e,t,h,o,d);
3161 const XMLCh DigestMethod::TYPE_NAME[] = UNICODE_LITERAL_16(D,i,g,e,s,t,M,e,t,h,o,d,T,y,p,e);
3162 const XMLCh DigestMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3163 const XMLCh DiscoHints::LOCAL_NAME[] = UNICODE_LITERAL_10(D,i,s,c,o,H,i,n,t,s);
3164 const XMLCh DiscoHints::TYPE_NAME[] = UNICODE_LITERAL_14(D,i,s,c,o,H,i,n,t,s,T,y,p,e);
3165 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);
3166 const XMLCh DisplayName::LOCAL_NAME[] = UNICODE_LITERAL_11(D,i,s,p,l,a,y,N,a,m,e);
3167 const XMLCh DomainHint::LOCAL_NAME[] = UNICODE_LITERAL_10(D,o,m,a,i,n,H,i,n,t);
3168 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
3169 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
3170 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
3171 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
3172 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
3173 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);
3174 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);
3175 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);
3176 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3177 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
3178 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
3179 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);
3180 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3181 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
3182 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
3183 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);
3184 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
3185 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
3186 const XMLCh GeolocationHint::LOCAL_NAME[] = UNICODE_LITERAL_15(G,e,o,l,o,c,a,t,i,o,n,H,i,n,t);
3187 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
3188 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3189 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);
3190 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);
3191 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
3192 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);
3193 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3194 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3195 const XMLCh InformationURL::LOCAL_NAME[] = UNICODE_LITERAL_14(I,n,f,o,r,m,a,t,i,o,n,U,R,L);
3196 const XMLCh IPHint::LOCAL_NAME[] = UNICODE_LITERAL_6(I,P,H,i,n,t);
3197 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
3198 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);
3199 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
3200 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
3201 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
3202 const XMLCh Logo::LOCAL_NAME[] = UNICODE_LITERAL_4(L,o,g,o);
3203 const XMLCh Logo::TYPE_NAME[] = UNICODE_LITERAL_8(L,o,g,o,T,y,p,e);
3204 const XMLCh Logo::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3205 const XMLCh Logo::HEIGHT_ATTRIB_NAME[] = UNICODE_LITERAL_6(h,e,i,g,h,t);
3206 const XMLCh Logo::WIDTH_ATTRIB_NAME[] = UNICODE_LITERAL_5(w,i,d,t,h);
3207 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
3208 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);
3209 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3210 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
3211 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
3212 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3213 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);
3214 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
3215 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);
3216 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
3217 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
3218 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
3219 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);
3220 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
3221 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
3222 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);
3223 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);
3224 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
3225 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);
3226 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);
3227 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);
3228 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);
3229 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
3230 const XMLCh RequestInitiator::LOCAL_NAME[] = UNICODE_LITERAL_16(R,e,q,u,e,s,t,I,n,i,t,i,a,t,o,r);
3231 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3232 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3233 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);
3234 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
3235 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);
3236 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
3237 const XMLCh SigningMethod::LOCAL_NAME[] = UNICODE_LITERAL_13(S,i,g,n,i,n,g,M,e,t,h,o,d);
3238 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);
3239 const XMLCh SigningMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3240 const XMLCh SigningMethod::MINKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,i,n,K,e,y,S,i,z,e);
3241 const XMLCh SigningMethod::MAXKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,a,x,K,e,y,S,i,z,e);
3242 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);
3243 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);
3244 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
3245 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3246 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);
3247 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);
3248 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);
3249 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
3250 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);
3251 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
3252 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
3253 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
3254 const XMLCh UIInfo::LOCAL_NAME[] = UNICODE_LITERAL_6(U,I,I,n,f,o);
3255 const XMLCh UIInfo::TYPE_NAME[] = UNICODE_LITERAL_10(U,I,I,n,f,o,T,y,p,e);