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);
123 attr->setNodeValue(m_Lang);
124 domElement->setAttributeNodeNS(attr);
128 void processAttribute(const DOMAttr* attribute) {
129 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
130 setLang(attribute->getValue());
131 const XMLCh* temp = attribute->getPrefix();
132 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
133 m_LangPrefix = XMLString::replicate(temp);
136 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
140 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
141 public AbstractSimpleElement,
142 public AbstractDOMCachingXMLObject,
143 public AbstractXMLObjectMarshaller,
144 public AbstractXMLObjectUnmarshaller
148 m_LangPrefix=nullptr;
152 localizedURITypeImpl() {
157 virtual ~localizedURITypeImpl() {
158 XMLString::release(&m_Lang);
159 XMLString::release(&m_LangPrefix);
162 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
163 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
167 localizedURITypeImpl(const localizedURITypeImpl& src)
168 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
170 setLang(src.getLang());
171 if (src.m_LangPrefix)
172 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
175 IMPL_XMLOBJECT_CLONE(localizedURIType);
176 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
179 void marshallAttributes(DOMElement* domElement) const {
180 if (m_Lang && *m_Lang) {
181 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
182 if (m_LangPrefix && *m_LangPrefix)
183 attr->setPrefix(m_LangPrefix);
184 attr->setNodeValue(m_Lang);
185 domElement->setAttributeNodeNS(attr);
189 void processAttribute(const DOMAttr* attribute) {
190 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
191 setLang(attribute->getValue());
192 const XMLCh* temp = attribute->getPrefix();
193 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
194 m_LangPrefix = XMLString::replicate(temp);
197 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
201 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
204 virtual ~OrganizationNameImpl() {}
206 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
207 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
209 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
211 IMPL_XMLOBJECT_CLONE(OrganizationName);
212 localizedNameType* clonelocalizedNameType() const {
213 return new OrganizationNameImpl(*this);
217 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
220 virtual ~OrganizationDisplayNameImpl() {}
222 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
223 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
225 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
227 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
228 localizedNameType* clonelocalizedNameType() const {
229 return new OrganizationDisplayNameImpl(*this);
233 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
236 virtual ~OrganizationURLImpl() {}
238 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
239 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
241 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
243 IMPL_XMLOBJECT_CLONE(OrganizationURL);
244 localizedURIType* clonelocalizedURIType() const {
245 return new OrganizationURLImpl(*this);
249 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
252 virtual ~ServiceNameImpl() {}
254 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
255 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
257 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
259 IMPL_XMLOBJECT_CLONE(ServiceName);
260 localizedNameType* clonelocalizedNameType() const {
261 return new ServiceNameImpl(*this);
265 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
268 virtual ~ServiceDescriptionImpl() {}
270 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
271 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
273 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
275 IMPL_XMLOBJECT_CLONE(ServiceDescription);
276 localizedNameType* clonelocalizedNameType() const {
277 return new ServiceDescriptionImpl(*this);
281 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
282 public AbstractComplexElement,
283 public AbstractDOMCachingXMLObject,
284 public AbstractXMLObjectMarshaller,
285 public AbstractXMLObjectUnmarshaller
288 virtual ~ExtensionsImpl() {}
290 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
291 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
294 ExtensionsImpl(const ExtensionsImpl& src)
295 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
296 VectorOf(XMLObject) v=getUnknownXMLObjects();
297 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
298 v.push_back((*i)->clone());
301 IMPL_XMLOBJECT_CLONE(Extensions);
302 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
305 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
307 const XMLCh* nsURI=root->getNamespaceURI();
308 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
309 getUnknownXMLObjects().push_back(childXMLObject);
313 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
317 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
318 public AbstractComplexElement,
319 public AbstractAttributeExtensibleXMLObject,
320 public AbstractDOMCachingXMLObject,
321 public AbstractXMLObjectMarshaller,
322 public AbstractXMLObjectUnmarshaller
324 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
325 list<XMLObject*>::iterator m_pos_OrganizationURL;
328 m_children.push_back(nullptr);
329 m_children.push_back(nullptr);
330 m_children.push_back(nullptr);
331 m_Extensions=nullptr;
332 m_pos_Extensions=m_children.begin();
333 m_pos_OrganizationDisplayName=m_pos_Extensions;
334 ++m_pos_OrganizationDisplayName;
335 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
336 ++m_pos_OrganizationURL;
339 virtual ~OrganizationImpl() {}
341 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
342 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
346 OrganizationImpl(const OrganizationImpl& src)
347 : AbstractXMLObject(src), AbstractComplexElement(src),
348 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
350 if (src.getExtensions())
351 setExtensions(src.getExtensions()->cloneExtensions());
352 VectorOf(OrganizationName) v=getOrganizationNames();
353 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
355 v.push_back((*i)->cloneOrganizationName());
358 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
359 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
361 w.push_back((*j)->cloneOrganizationDisplayName());
364 VectorOf(OrganizationURL) x=getOrganizationURLs();
365 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
367 x.push_back((*k)->cloneOrganizationURL());
372 IMPL_XMLOBJECT_CLONE(Organization);
373 IMPL_TYPED_CHILD(Extensions);
374 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
375 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
376 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
379 void marshallAttributes(DOMElement* domElement) const {
380 marshallExtensionAttributes(domElement);
383 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
384 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
385 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
386 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
387 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
388 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
391 void processAttribute(const DOMAttr* attribute) {
392 unmarshallExtensionAttribute(attribute);
396 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
397 public AbstractComplexElement,
398 public AbstractAttributeExtensibleXMLObject,
399 public AbstractDOMCachingXMLObject,
400 public AbstractXMLObjectMarshaller,
401 public AbstractXMLObjectUnmarshaller
403 list<XMLObject*>::iterator m_pos_TelephoneNumber;
406 m_ContactType=nullptr;
407 m_children.push_back(nullptr);
408 m_children.push_back(nullptr);
409 m_children.push_back(nullptr);
410 m_children.push_back(nullptr);
411 m_children.push_back(nullptr);
412 m_Extensions=nullptr;
416 m_pos_Extensions=m_children.begin();
417 m_pos_Company=m_pos_Extensions;
419 m_pos_GivenName=m_pos_Company;
421 m_pos_SurName=m_pos_GivenName;
423 m_pos_TelephoneNumber=m_pos_SurName;
424 ++m_pos_TelephoneNumber;
427 virtual ~ContactPersonImpl() {
428 XMLString::release(&m_ContactType);
431 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
432 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
436 ContactPersonImpl(const ContactPersonImpl& src)
437 : AbstractXMLObject(src), AbstractComplexElement(src),
438 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
440 if (src.getExtensions())
441 setExtensions(src.getExtensions()->cloneExtensions());
442 if (src.getCompany())
443 setCompany(src.getCompany()->cloneCompany());
444 if (src.getGivenName())
445 setGivenName(src.getGivenName()->cloneGivenName());
446 if (src.getSurName())
447 setSurName(src.getSurName()->cloneSurName());
449 VectorOf(EmailAddress) v=getEmailAddresss();
450 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
452 v.push_back((*i)->cloneEmailAddress());
455 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
456 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
458 w.push_back((*j)->cloneTelephoneNumber());
463 IMPL_XMLOBJECT_CLONE(ContactPerson);
464 IMPL_STRING_ATTRIB(ContactType);
465 IMPL_TYPED_CHILD(Extensions);
466 IMPL_TYPED_CHILD(Company);
467 IMPL_TYPED_CHILD(GivenName);
468 IMPL_TYPED_CHILD(SurName);
469 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
470 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
472 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
473 if (!qualifiedName.hasNamespaceURI()) {
474 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
475 setContactType(value);
479 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
483 void marshallAttributes(DOMElement* domElement) const {
484 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
485 marshallExtensionAttributes(domElement);
488 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
489 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
490 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
491 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
492 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
493 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
494 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
495 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
498 void processAttribute(const DOMAttr* attribute) {
499 unmarshallExtensionAttribute(attribute);
503 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
504 public AbstractSimpleElement,
505 public AbstractDOMCachingXMLObject,
506 public AbstractXMLObjectMarshaller,
507 public AbstractXMLObjectUnmarshaller
514 virtual ~AdditionalMetadataLocationImpl() {
515 XMLString::release(&m_Namespace);
518 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
519 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
523 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
524 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
528 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
529 IMPL_STRING_ATTRIB(Namespace);
532 void marshallAttributes(DOMElement* domElement) const {
533 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
536 void processAttribute(const DOMAttr* attribute) {
537 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
538 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
542 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
543 public AbstractComplexElement,
544 public AbstractDOMCachingXMLObject,
545 public AbstractXMLObjectMarshaller,
546 public AbstractXMLObjectUnmarshaller
551 m_children.push_back(nullptr);
552 m_pos_KeyInfo=m_children.begin();
555 virtual ~KeyDescriptorImpl() {
556 XMLString::release(&m_Use);
559 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
560 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
564 KeyDescriptorImpl(const KeyDescriptorImpl& src)
565 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
567 setUse(src.getUse());
568 if (src.getKeyInfo())
569 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
570 VectorOf(EncryptionMethod) v=getEncryptionMethods();
571 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
573 v.push_back((*i)->cloneEncryptionMethod());
578 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
579 IMPL_STRING_ATTRIB(Use);
580 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
581 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
584 void marshallAttributes(DOMElement* domElement) const {
585 MARSHALL_STRING_ATTRIB(Use,USE,nullptr);
588 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
589 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
590 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
591 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
594 void processAttribute(const DOMAttr* attribute) {
595 PROC_STRING_ATTRIB(Use,USE,nullptr);
596 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
600 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
601 public AbstractAttributeExtensibleXMLObject,
602 public AbstractComplexElement,
603 public AbstractDOMCachingXMLObject,
604 public AbstractXMLObjectMarshaller,
605 public AbstractXMLObjectUnmarshaller
608 m_Binding=m_Location=m_ResponseLocation=nullptr;
617 virtual ~EndpointTypeImpl() {
618 XMLString::release(&m_Binding);
619 XMLString::release(&m_Location);
620 XMLString::release(&m_ResponseLocation);
623 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
624 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
627 EndpointTypeImpl(const EndpointTypeImpl& src)
628 : AbstractXMLObject(src),
629 AbstractAttributeExtensibleXMLObject(src),
630 AbstractComplexElement(src),
631 AbstractDOMCachingXMLObject(src) {
632 setBinding(src.getBinding());
633 setLocation(src.getLocation());
634 setResponseLocation(src.getResponseLocation());
635 VectorOf(XMLObject) v=getUnknownXMLObjects();
636 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
637 v.push_back((*i)->clone());
640 IMPL_XMLOBJECT_CLONE(EndpointType);
641 IMPL_STRING_ATTRIB(Binding);
642 IMPL_STRING_ATTRIB(Location);
643 IMPL_STRING_ATTRIB(ResponseLocation);
644 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
646 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
647 if (!qualifiedName.hasNamespaceURI()) {
648 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
652 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
656 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
657 setResponseLocation(value);
661 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
664 void marshallAttributes(DOMElement* domElement) const {
665 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
666 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
667 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
668 marshallExtensionAttributes(domElement);
671 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
673 const XMLCh* nsURI=root->getNamespaceURI();
674 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
675 getUnknownXMLObjects().push_back(childXMLObject);
678 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
681 void processAttribute(const DOMAttr* attribute) {
682 unmarshallExtensionAttribute(attribute);
686 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
690 m_isDefault=XML_BOOL_NULL;
694 IndexedEndpointTypeImpl() {
698 virtual ~IndexedEndpointTypeImpl() {
699 XMLString::release(&m_Index);
702 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
703 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
705 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
706 setIndex(src.m_Index);
707 isDefault(src.m_isDefault);
710 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
711 EndpointType* cloneEndpointType() const {
712 return new IndexedEndpointTypeImpl(*this);
715 IMPL_INTEGER_ATTRIB(Index);
716 IMPL_BOOLEAN_ATTRIB(isDefault);
718 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
719 if (!qualifiedName.hasNamespaceURI()) {
720 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
724 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
729 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
733 void marshallAttributes(DOMElement* domElement) const {
734 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
735 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
736 EndpointTypeImpl::marshallAttributes(domElement);
740 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
743 virtual ~ArtifactResolutionServiceImpl() {}
745 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
746 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
748 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
750 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
751 IndexedEndpointType* cloneIndexedEndpointType() const {
752 return new ArtifactResolutionServiceImpl(*this);
754 EndpointType* cloneEndpointType() const {
755 return new ArtifactResolutionServiceImpl(*this);
759 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
762 virtual ~SingleLogoutServiceImpl() {}
764 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
765 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
767 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
769 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
770 EndpointType* cloneEndpointType() const {
771 return new SingleLogoutServiceImpl(*this);
775 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
778 virtual ~ManageNameIDServiceImpl() {}
780 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
781 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
783 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
785 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
786 EndpointType* cloneEndpointType() const {
787 return new ManageNameIDServiceImpl(*this);
791 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
794 virtual ~SingleSignOnServiceImpl() {}
796 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
797 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
799 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
801 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
802 EndpointType* cloneEndpointType() const {
803 return new SingleSignOnServiceImpl(*this);
807 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
810 virtual ~NameIDMappingServiceImpl() {}
812 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
813 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
815 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
817 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
818 EndpointType* cloneEndpointType() const {
819 return new NameIDMappingServiceImpl(*this);
823 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
826 virtual ~AssertionIDRequestServiceImpl() {}
828 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
829 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
831 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
833 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
834 EndpointType* cloneEndpointType() const {
835 return new AssertionIDRequestServiceImpl(*this);
839 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
842 virtual ~AssertionConsumerServiceImpl() {}
844 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
845 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
847 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
849 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
850 EndpointType* cloneEndpointType() const {
851 return new AssertionConsumerServiceImpl(*this);
853 IndexedEndpointType* cloneIndexedEndpointType() const {
854 return new AssertionConsumerServiceImpl(*this);
858 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
861 virtual ~AuthnQueryServiceImpl() {}
863 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
864 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
866 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
868 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
869 EndpointType* cloneEndpointType() const {
870 return new AuthnQueryServiceImpl(*this);
874 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
877 virtual ~AuthzServiceImpl() {}
879 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
880 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
882 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
884 IMPL_XMLOBJECT_CLONE(AuthzService);
885 EndpointType* cloneEndpointType() const {
886 return new AuthzServiceImpl(*this);
890 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
893 virtual ~AttributeServiceImpl() {}
895 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
896 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
898 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
900 IMPL_XMLOBJECT_CLONE(AttributeService);
901 EndpointType* cloneEndpointType() const {
902 return new AttributeServiceImpl(*this);
906 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
907 public virtual SignableObject,
908 public AbstractComplexElement,
909 public AbstractAttributeExtensibleXMLObject,
910 public AbstractDOMCachingXMLObject,
911 public AbstractXMLObjectMarshaller,
912 public AbstractXMLObjectUnmarshaller
915 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
916 m_ValidUntil=m_CacheDuration=nullptr;
917 m_children.push_back(nullptr);
918 m_children.push_back(nullptr);
919 m_children.push_back(nullptr);
920 m_children.push_back(nullptr);
922 m_Extensions=nullptr;
923 m_Organization=nullptr;
924 m_pos_Signature=m_children.begin();
925 m_pos_Extensions=m_pos_Signature;
927 m_pos_Organization=m_pos_Extensions;
928 ++m_pos_Organization;
929 m_pos_ContactPerson=m_pos_Organization;
930 ++m_pos_ContactPerson;
934 list<XMLObject*>::iterator m_pos_ContactPerson;
936 RoleDescriptorImpl() {
941 virtual ~RoleDescriptorImpl() {
942 XMLString::release(&m_ID);
943 XMLString::release(&m_ProtocolSupportEnumeration);
944 XMLString::release(&m_ErrorURL);
946 delete m_CacheDuration;
949 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
950 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
954 RoleDescriptorImpl(const RoleDescriptorImpl& src)
955 : AbstractXMLObject(src), AbstractComplexElement(src),
956 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
959 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
960 setErrorURL(src.getErrorURL());
961 setValidUntil(src.getValidUntil());
962 setCacheDuration(src.getCacheDuration());
963 if (src.getSignature())
964 setSignature(src.getSignature()->cloneSignature());
965 if (src.getExtensions())
966 setExtensions(src.getExtensions()->cloneExtensions());
967 if (src.getOrganization())
968 setOrganization(src.getOrganization()->cloneOrganization());
970 VectorOf(KeyDescriptor) v=getKeyDescriptors();
971 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
973 v.push_back((*i)->cloneKeyDescriptor());
976 VectorOf(ContactPerson) w=getContactPersons();
977 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
979 w.push_back((*j)->cloneContactPerson());
984 //IMPL_TYPED_CHILD(Signature);
985 // Need customized setter.
987 Signature* m_Signature;
988 list<XMLObject*>::iterator m_pos_Signature;
990 Signature* getSignature() const {
994 void setSignature(Signature* sig) {
995 prepareForAssignment(m_Signature,sig);
996 *m_pos_Signature=m_Signature=sig;
997 // Sync content reference back up.
999 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1002 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1003 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
1004 IMPL_STRING_ATTRIB(ErrorURL);
1005 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1006 IMPL_DURATION_ATTRIB(CacheDuration,0);
1007 IMPL_TYPED_CHILD(Extensions);
1008 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
1009 IMPL_TYPED_CHILD(Organization);
1010 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1012 bool hasSupport(const XMLCh* protocol) const {
1013 if (!protocol || !*protocol)
1015 if (m_ProtocolSupportEnumeration) {
1016 // Look for first character.
1017 xsecsize_t len=XMLString::stringLen(protocol);
1019 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1021 // Only possible match is if it's the first character or a space comes before it.
1022 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1023 // See if rest of protocol string is present.
1024 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1025 // Only possible match is if it's the last character or a space comes after it.
1026 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1032 // Move past last search and start again.
1037 // Move past last search and start again.
1040 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1046 void addSupport(const XMLCh* protocol) {
1047 if (hasSupport(protocol))
1049 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1050 #ifdef HAVE_GOOD_STL
1051 xstring pse(m_ProtocolSupportEnumeration);
1052 pse = pse + chSpace + protocol;
1053 setProtocolSupportEnumeration(pse.c_str());
1055 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1056 auto_ptr_char temp2(protocol);
1057 string pse(temp.get());
1058 pse = pse + ' ' + temp2.get();
1059 auto_ptr_XMLCh temp3(pse.c_str());
1060 setProtocolSupportEnumeration(temp3.get());
1064 setProtocolSupportEnumeration(protocol);
1068 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1069 if (!qualifiedName.hasNamespaceURI()) {
1070 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1074 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1075 setProtocolSupportEnumeration(value);
1078 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1082 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1083 setValidUntil(value);
1086 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1087 setCacheDuration(value);
1091 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1095 void prepareForMarshalling() const {
1097 declareNonVisibleNamespaces();
1100 void marshallAttributes(DOMElement* domElement) const {
1101 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1102 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
1103 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
1104 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1105 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1106 marshallExtensionAttributes(domElement);
1109 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1110 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1111 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1112 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1113 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1114 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1115 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1118 void processAttribute(const DOMAttr* attribute) {
1119 PROC_ID_ATTRIB(ID,ID,nullptr);
1120 unmarshallExtensionAttribute(attribute);
1124 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1127 virtual ~RoleDescriptorTypeImpl() {}
1129 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1130 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1133 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1134 VectorOf(XMLObject) v=getUnknownXMLObjects();
1135 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1136 v.push_back((*i)->clone());
1139 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1140 RoleDescriptor* cloneRoleDescriptor() const {
1141 return new RoleDescriptorTypeImpl(*this);
1144 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1147 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1148 getUnknownXMLObjects().push_back(childXMLObject);
1152 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1155 m_children.push_back(nullptr);
1156 m_children.push_back(nullptr);
1157 m_children.push_back(nullptr);
1158 m_children.push_back(nullptr);
1159 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1160 ++m_pos_ArtifactResolutionService;
1161 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1162 ++m_pos_SingleLogoutService;
1163 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1164 ++m_pos_ManageNameIDService;
1165 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1166 ++m_pos_NameIDFormat;
1170 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1171 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1172 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1173 list<XMLObject*>::iterator m_pos_NameIDFormat;
1175 SSODescriptorTypeImpl() {
1180 virtual ~SSODescriptorTypeImpl() {}
1182 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1183 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1187 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1189 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1190 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1192 v.push_back((*i)->cloneArtifactResolutionService());
1195 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1196 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1198 w.push_back((*j)->cloneSingleLogoutService());
1201 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1202 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1204 x.push_back((*k)->cloneManageNameIDService());
1207 VectorOf(NameIDFormat) y=getNameIDFormats();
1208 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1210 y.push_back((*m)->cloneNameIDFormat());
1215 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1216 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1217 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1218 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1221 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1222 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1223 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1224 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1225 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1226 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1230 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1232 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1233 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1234 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1235 list<XMLObject*>::iterator m_pos_AttributeProfile;
1238 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1239 m_children.push_back(nullptr);
1240 m_children.push_back(nullptr);
1241 m_children.push_back(nullptr);
1242 m_children.push_back(nullptr);
1243 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1244 ++m_pos_SingleSignOnService;
1245 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1246 ++m_pos_NameIDMappingService;
1247 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1248 ++m_pos_AssertionIDRequestService;
1249 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1250 ++m_pos_AttributeProfile;
1254 virtual ~IDPSSODescriptorImpl() {}
1256 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1257 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1261 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1263 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1264 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1265 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1267 v.push_back((*i)->cloneSingleSignOnService());
1270 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1271 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1273 w.push_back((*j)->cloneNameIDMappingService());
1276 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1277 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1279 x.push_back((*k)->cloneAssertionIDRequestService());
1282 VectorOf(AttributeProfile) y=getAttributeProfiles();
1283 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1285 y.push_back((*m)->cloneAttributeProfile());
1288 VectorOf(Attribute) z=getAttributes();
1289 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1291 z.push_back((*n)->cloneAttribute());
1296 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1297 SSODescriptorType* cloneSSODescriptorType() const {
1298 return new IDPSSODescriptorImpl(*this);
1300 RoleDescriptor* cloneRoleDescriptor() const {
1301 return new IDPSSODescriptorImpl(*this);
1304 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1305 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1306 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1307 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1308 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1309 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1311 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1312 if (!qualifiedName.hasNamespaceURI()) {
1313 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1314 setWantAuthnRequestsSigned(value);
1318 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1322 void marshallAttributes(DOMElement* domElement) const {
1323 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1324 RoleDescriptorImpl::marshallAttributes(domElement);
1327 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1328 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1329 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1330 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1331 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1332 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1333 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1337 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1338 public AbstractComplexElement,
1339 public AbstractAttributeExtensibleXMLObject,
1340 public AbstractDOMCachingXMLObject,
1341 public AbstractXMLObjectMarshaller,
1342 public AbstractXMLObjectUnmarshaller
1345 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1346 m_isRequired=XML_BOOL_NULL;
1349 virtual ~RequestedAttributeImpl() {
1350 XMLString::release(&m_Name);
1351 XMLString::release(&m_NameFormat);
1352 XMLString::release(&m_FriendlyName);
1355 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1356 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1360 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1361 : AbstractXMLObject(src), AbstractComplexElement(src),
1362 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1364 setName(src.getName());
1365 setNameFormat(src.getNameFormat());
1366 setFriendlyName(src.getFriendlyName());
1367 isRequired(src.m_isRequired);
1368 VectorOf(XMLObject) v=getAttributeValues();
1369 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1371 v.push_back((*i)->clone());
1376 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1377 Attribute* cloneAttribute() const {
1378 return new RequestedAttributeImpl(*this);
1381 IMPL_STRING_ATTRIB(Name);
1382 IMPL_STRING_ATTRIB(NameFormat);
1383 IMPL_STRING_ATTRIB(FriendlyName);
1384 IMPL_BOOLEAN_ATTRIB(isRequired);
1385 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1387 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1388 if (!qualifiedName.hasNamespaceURI()) {
1389 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1393 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1394 setNameFormat(value);
1397 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1398 setFriendlyName(value);
1401 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1402 setisRequired(value);
1406 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1410 void marshallAttributes(DOMElement* domElement) const {
1411 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1412 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1413 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1414 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1415 marshallExtensionAttributes(domElement);
1418 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1419 getAttributeValues().push_back(childXMLObject);
1422 void processAttribute(const DOMAttr* attribute) {
1423 unmarshallExtensionAttribute(attribute);
1427 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1428 public AbstractComplexElement,
1429 public AbstractDOMCachingXMLObject,
1430 public AbstractXMLObjectMarshaller,
1431 public AbstractXMLObjectUnmarshaller
1433 list<XMLObject*>::iterator m_pos_ServiceDescription;
1434 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1438 m_isDefault=XML_BOOL_NULL;
1439 m_children.push_back(nullptr);
1440 m_children.push_back(nullptr);
1441 m_pos_ServiceDescription=m_children.begin();
1442 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1443 ++m_pos_RequestedAttribute;
1447 virtual ~AttributeConsumingServiceImpl() {
1448 XMLString::release(&m_Index);
1451 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1452 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1456 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1457 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1459 setIndex(src.m_Index);
1460 isDefault(src.m_isDefault);
1461 VectorOf(ServiceName) v=getServiceNames();
1462 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1464 v.push_back((*i)->cloneServiceName());
1467 VectorOf(ServiceDescription) w=getServiceDescriptions();
1468 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1470 w.push_back((*j)->cloneServiceDescription());
1473 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1474 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1476 x.push_back((*k)->cloneRequestedAttribute());
1481 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1482 IMPL_INTEGER_ATTRIB(Index);
1483 IMPL_BOOLEAN_ATTRIB(isDefault);
1484 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1485 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1486 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1489 void marshallAttributes(DOMElement* domElement) const {
1490 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1491 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1494 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1495 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1496 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1497 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1498 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1501 void processAttribute(const DOMAttr* attribute) {
1502 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1503 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1504 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1508 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1510 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1513 m_AuthnRequestsSigned=XML_BOOL_NULL;
1514 m_WantAssertionsSigned=XML_BOOL_NULL;
1515 m_children.push_back(nullptr);
1516 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1517 ++m_pos_AssertionConsumerService;
1521 virtual ~SPSSODescriptorImpl() {}
1523 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1524 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1528 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1530 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1531 WantAssertionsSigned(src.m_WantAssertionsSigned);
1532 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1533 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1535 v.push_back((*i)->cloneAssertionConsumerService());
1538 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1539 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1541 w.push_back((*j)->cloneAttributeConsumingService());
1546 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1547 SSODescriptorType* cloneSSODescriptorType() const {
1548 return cloneSPSSODescriptor();
1550 RoleDescriptor* cloneRoleDescriptor() const {
1551 return cloneSPSSODescriptor();
1554 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1555 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1556 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1557 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1559 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1560 if (!qualifiedName.hasNamespaceURI()) {
1561 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1562 setAuthnRequestsSigned(value);
1565 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1566 setWantAssertionsSigned(value);
1570 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1574 void marshallAttributes(DOMElement* domElement) const {
1575 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1576 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1577 RoleDescriptorImpl::marshallAttributes(domElement);
1580 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1581 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1582 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1583 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1587 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1589 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1590 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1593 m_children.push_back(nullptr);
1594 m_children.push_back(nullptr);
1595 m_pos_AuthnQueryService=m_pos_ContactPerson;
1596 ++m_pos_AuthnQueryService;
1597 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1598 ++m_pos_AssertionIDRequestService;
1602 virtual ~AuthnAuthorityDescriptorImpl() {}
1604 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1605 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1609 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1611 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1612 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1614 v.push_back((*i)->cloneAuthnQueryService());
1617 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1618 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1620 w.push_back((*j)->cloneAssertionIDRequestService());
1623 VectorOf(NameIDFormat) x=getNameIDFormats();
1624 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1626 x.push_back((*k)->cloneNameIDFormat());
1631 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1632 RoleDescriptor* cloneRoleDescriptor() const {
1633 return cloneAuthnAuthorityDescriptor();
1636 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1637 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1638 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1641 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1642 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1643 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1644 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1645 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1649 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1651 list<XMLObject*>::iterator m_pos_AuthzService;
1652 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1655 m_children.push_back(nullptr);
1656 m_children.push_back(nullptr);
1657 m_pos_AuthzService=m_pos_ContactPerson;
1658 ++m_pos_AuthzService;
1659 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1660 ++m_pos_AssertionIDRequestService;
1664 virtual ~PDPDescriptorImpl() {}
1666 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1667 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1671 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1673 VectorOf(AuthzService) v=getAuthzServices();
1674 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1676 v.push_back((*i)->cloneAuthzService());
1679 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1680 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1682 w.push_back((*j)->cloneAssertionIDRequestService());
1685 VectorOf(NameIDFormat) x=getNameIDFormats();
1686 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1688 x.push_back((*k)->cloneNameIDFormat());
1693 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1694 RoleDescriptor* cloneRoleDescriptor() const {
1695 return clonePDPDescriptor();
1698 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1699 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1700 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1703 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1704 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1705 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1706 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1707 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1711 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1713 list<XMLObject*>::iterator m_pos_AttributeService;
1714 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1715 list<XMLObject*>::iterator m_pos_NameIDFormat;
1716 list<XMLObject*>::iterator m_pos_AttributeProfile;
1719 m_children.push_back(nullptr);
1720 m_children.push_back(nullptr);
1721 m_children.push_back(nullptr);
1722 m_children.push_back(nullptr);
1723 m_pos_AttributeService=m_pos_ContactPerson;
1724 ++m_pos_AttributeService;
1725 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1726 ++m_pos_AssertionIDRequestService;
1727 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1728 ++m_pos_NameIDFormat;
1729 m_pos_AttributeProfile=m_pos_NameIDFormat;
1730 ++m_pos_AttributeProfile;
1734 virtual ~AttributeAuthorityDescriptorImpl() {}
1736 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1737 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1741 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1743 VectorOf(AttributeService) v=getAttributeServices();
1744 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1746 v.push_back((*i)->cloneAttributeService());
1749 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1750 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1752 w.push_back((*j)->cloneAssertionIDRequestService());
1755 VectorOf(NameIDFormat) x=getNameIDFormats();
1756 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1758 x.push_back((*k)->cloneNameIDFormat());
1761 VectorOf(AttributeProfile) y=getAttributeProfiles();
1762 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1764 y.push_back((*m)->cloneAttributeProfile());
1767 VectorOf(Attribute) z=getAttributes();
1768 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1770 z.push_back((*n)->cloneAttribute());
1775 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1776 RoleDescriptor* cloneRoleDescriptor() const {
1777 return cloneAttributeAuthorityDescriptor();
1780 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1781 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1782 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1783 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1784 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1787 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1788 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1789 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1790 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1791 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1792 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1793 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1797 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1800 m_WantAssertionsSigned=XML_BOOL_NULL;
1801 m_children.push_back(nullptr);
1802 m_pos_NameIDFormat=m_pos_ContactPerson;
1803 ++m_pos_NameIDFormat;
1807 list<XMLObject*>::iterator m_pos_NameIDFormat;
1809 QueryDescriptorTypeImpl() {
1814 virtual ~QueryDescriptorTypeImpl() {}
1816 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1817 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1821 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1823 WantAssertionsSigned(src.m_WantAssertionsSigned);
1824 VectorOf(NameIDFormat) y=getNameIDFormats();
1825 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1827 y.push_back((*m)->cloneNameIDFormat());
1832 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1833 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1835 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1836 if (!qualifiedName.hasNamespaceURI()) {
1837 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1838 setWantAssertionsSigned(value);
1842 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1846 void marshallAttributes(DOMElement* domElement) const {
1847 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1848 RoleDescriptorImpl::marshallAttributes(domElement);
1851 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1852 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1853 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1857 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1860 virtual ~AuthnQueryDescriptorTypeImpl() {}
1862 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1863 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1865 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1867 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1868 QueryDescriptorType* cloneQueryDescriptorType() const {
1869 return new AuthnQueryDescriptorTypeImpl(*this);
1871 RoleDescriptor* cloneRoleDescriptor() const {
1872 return new AuthnQueryDescriptorTypeImpl(*this);
1876 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1879 virtual ~AttributeQueryDescriptorTypeImpl() {}
1881 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1882 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1884 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1885 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1886 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1887 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1889 w.push_back((*j)->cloneAttributeConsumingService());
1894 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1895 QueryDescriptorType* cloneQueryDescriptorType() const {
1896 return new AttributeQueryDescriptorTypeImpl(*this);
1898 RoleDescriptor* cloneRoleDescriptor() const {
1899 return new AttributeQueryDescriptorTypeImpl(*this);
1902 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1905 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1906 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1907 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1911 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1914 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1916 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1917 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1919 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1920 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1921 VectorOf(ActionNamespace) w=getActionNamespaces();
1922 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1924 w.push_back((*j)->cloneActionNamespace());
1929 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1930 QueryDescriptorType* cloneQueryDescriptorType() const {
1931 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1933 RoleDescriptor* cloneRoleDescriptor() const {
1934 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1937 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1940 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1941 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1942 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1946 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1947 public virtual SignableObject,
1948 public AbstractComplexElement,
1949 public AbstractAttributeExtensibleXMLObject,
1950 public AbstractDOMCachingXMLObject,
1951 public AbstractXMLObjectMarshaller,
1952 public AbstractXMLObjectUnmarshaller
1954 list<XMLObject*>::iterator m_pos_AffiliateMember;
1957 m_ID=m_AffiliationOwnerID=nullptr;
1958 m_ValidUntil=m_CacheDuration=nullptr;
1959 m_children.push_back(nullptr);
1960 m_children.push_back(nullptr);
1961 m_children.push_back(nullptr);
1962 m_Signature=nullptr;
1963 m_Extensions=nullptr;
1964 m_pos_Signature=m_children.begin();
1965 m_pos_Extensions=m_pos_Signature;
1967 m_pos_AffiliateMember=m_pos_Extensions;
1968 ++m_pos_AffiliateMember;
1972 virtual ~AffiliationDescriptorImpl() {
1973 XMLString::release(&m_ID);
1974 XMLString::release(&m_AffiliationOwnerID);
1975 delete m_ValidUntil;
1976 delete m_CacheDuration;
1979 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1980 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1984 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1985 : AbstractXMLObject(src), AbstractComplexElement(src),
1986 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1989 setAffiliationOwnerID(src.getAffiliationOwnerID());
1990 setValidUntil(src.getValidUntil());
1991 setCacheDuration(src.getCacheDuration());
1992 if (src.getSignature())
1993 setSignature(src.getSignature()->cloneSignature());
1994 if (src.getExtensions())
1995 setExtensions(src.getExtensions()->cloneExtensions());
1997 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1998 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
2000 v.push_back((*i)->cloneKeyDescriptor());
2003 VectorOf(AffiliateMember) w=getAffiliateMembers();
2004 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
2006 w.push_back((*j)->cloneAffiliateMember());
2011 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
2013 //IMPL_TYPED_CHILD(Signature);
2014 // Need customized setter.
2016 Signature* m_Signature;
2017 list<XMLObject*>::iterator m_pos_Signature;
2019 Signature* getSignature() const {
2023 void setSignature(Signature* sig) {
2024 prepareForAssignment(m_Signature,sig);
2025 *m_pos_Signature=m_Signature=sig;
2026 // Sync content reference back up.
2028 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2031 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2032 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2033 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2034 IMPL_DURATION_ATTRIB(CacheDuration,0);
2035 IMPL_TYPED_CHILD(Extensions);
2036 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2037 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2039 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2040 if (!qualifiedName.hasNamespaceURI()) {
2041 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2045 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2046 setAffiliationOwnerID(value);
2049 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2050 setValidUntil(value);
2053 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2054 setCacheDuration(value);
2058 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2062 void prepareForMarshalling() const {
2064 declareNonVisibleNamespaces();
2067 void marshallAttributes(DOMElement* domElement) const {
2068 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2069 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
2070 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2071 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2072 marshallExtensionAttributes(domElement);
2075 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2076 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2077 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2078 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2079 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2080 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2083 void processAttribute(const DOMAttr* attribute) {
2084 PROC_ID_ATTRIB(ID,ID,nullptr);
2085 unmarshallExtensionAttribute(attribute);
2089 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2090 public virtual SignableObject,
2091 public AbstractComplexElement,
2092 public AbstractAttributeExtensibleXMLObject,
2093 public AbstractDOMCachingXMLObject,
2094 public AbstractXMLObjectMarshaller,
2095 public AbstractXMLObjectUnmarshaller
2097 list<XMLObject*>::iterator m_pos_ContactPerson;
2100 m_ID=m_EntityID=nullptr;
2101 m_ValidUntil=m_CacheDuration=nullptr;
2102 m_children.push_back(nullptr);
2103 m_children.push_back(nullptr);
2104 m_children.push_back(nullptr);
2105 m_children.push_back(nullptr);
2106 m_children.push_back(nullptr);
2107 m_Signature=nullptr;
2108 m_Extensions=nullptr;
2109 m_AffiliationDescriptor=nullptr;
2110 m_Organization=nullptr;
2111 m_pos_Signature=m_children.begin();
2112 m_pos_Extensions=m_pos_Signature;
2114 m_pos_AffiliationDescriptor=m_pos_Extensions;
2115 ++m_pos_AffiliationDescriptor;
2116 m_pos_Organization=m_pos_AffiliationDescriptor;
2117 ++m_pos_Organization;
2118 m_pos_ContactPerson=m_pos_Organization;
2119 ++m_pos_ContactPerson;
2123 virtual ~EntityDescriptorImpl() {
2124 XMLString::release(&m_ID);
2125 XMLString::release(&m_EntityID);
2126 delete m_ValidUntil;
2127 delete m_CacheDuration;
2130 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2131 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2135 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2136 : AbstractXMLObject(src), AbstractComplexElement(src),
2137 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2140 setEntityID(src.getEntityID());
2141 setValidUntil(src.getValidUntil());
2142 setCacheDuration(src.getCacheDuration());
2143 if (src.getSignature())
2144 setSignature(src.getSignature()->cloneSignature());
2145 if (src.getExtensions())
2146 setExtensions(src.getExtensions()->cloneExtensions());
2147 if (src.getAffiliationDescriptor())
2148 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2149 if (src.getOrganization())
2150 setOrganization(src.getOrganization()->cloneOrganization());
2152 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2154 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2156 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2160 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2162 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2166 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2168 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2172 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2174 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2178 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2180 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2184 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2186 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2190 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2192 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2196 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2198 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2202 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2204 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2210 VectorOf(ContactPerson) v=getContactPersons();
2211 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2213 v.push_back((*j)->cloneContactPerson());
2216 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2217 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2219 w.push_back((*k)->cloneAdditionalMetadataLocation());
2224 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2226 //IMPL_TYPED_CHILD(Signature);
2227 // Need customized setter.
2229 Signature* m_Signature;
2230 list<XMLObject*>::iterator m_pos_Signature;
2232 Signature* getSignature() const {
2236 void setSignature(Signature* sig) {
2237 prepareForAssignment(m_Signature,sig);
2238 *m_pos_Signature=m_Signature=sig;
2239 // Sync content reference back up.
2241 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2244 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2245 IMPL_STRING_ATTRIB(EntityID);
2246 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2247 IMPL_DURATION_ATTRIB(CacheDuration,0);
2248 IMPL_TYPED_CHILD(Extensions);
2249 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2250 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2251 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2252 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2253 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2254 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2255 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2256 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2257 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2258 IMPL_TYPED_CHILD(AffiliationDescriptor);
2259 IMPL_TYPED_CHILD(Organization);
2260 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2261 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2263 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2264 if (!qualifiedName.hasNamespaceURI()) {
2265 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2269 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2273 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2274 setValidUntil(value);
2277 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2278 setCacheDuration(value);
2282 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2285 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2286 // Check for "known" elements/types.
2287 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2288 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2289 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2290 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2291 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2292 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2293 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2294 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2295 if (qname == PDPDescriptor::ELEMENT_QNAME)
2296 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2297 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2298 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2299 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2300 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2301 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2302 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2304 vector<RoleDescriptor*>::const_iterator i =
2305 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2306 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2310 void prepareForMarshalling() const {
2312 declareNonVisibleNamespaces();
2315 void marshallAttributes(DOMElement* domElement) const {
2316 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2317 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2318 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2319 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2320 marshallExtensionAttributes(domElement);
2323 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2324 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2325 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2326 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2327 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2328 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2329 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2330 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2331 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2332 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2333 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2334 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2335 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2336 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2337 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2338 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2339 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2342 void processAttribute(const DOMAttr* attribute) {
2343 PROC_ID_ATTRIB(ID,ID,nullptr);
2344 unmarshallExtensionAttribute(attribute);
2348 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2349 public virtual SignableObject,
2350 public AbstractComplexElement,
2351 public AbstractDOMCachingXMLObject,
2352 public AbstractXMLObjectMarshaller,
2353 public AbstractXMLObjectUnmarshaller
2356 m_ID=m_Name=nullptr;
2357 m_ValidUntil=m_CacheDuration=nullptr;
2358 m_children.push_back(nullptr);
2359 m_children.push_back(nullptr);
2360 m_Signature=nullptr;
2361 m_Extensions=nullptr;
2362 m_pos_Signature=m_children.begin();
2363 m_pos_Extensions=m_pos_Signature;
2368 virtual ~EntitiesDescriptorImpl() {
2369 XMLString::release(&m_ID);
2370 XMLString::release(&m_Name);
2371 delete m_ValidUntil;
2372 delete m_CacheDuration;
2375 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2376 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2380 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2381 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2384 setName(src.getName());
2385 setValidUntil(src.getValidUntil());
2386 setCacheDuration(src.getCacheDuration());
2387 if (src.getSignature())
2388 setSignature(src.getSignature()->cloneSignature());
2389 if (src.getExtensions())
2390 setExtensions(src.getExtensions()->cloneExtensions());
2392 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2394 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2396 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2400 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2402 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2409 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2411 //IMPL_TYPED_CHILD(Signature);
2412 // Need customized setter.
2414 Signature* m_Signature;
2415 list<XMLObject*>::iterator m_pos_Signature;
2417 Signature* getSignature() const {
2421 void setSignature(Signature* sig) {
2422 prepareForAssignment(m_Signature,sig);
2423 *m_pos_Signature=m_Signature=sig;
2424 // Sync content reference back up.
2426 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2429 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2430 IMPL_STRING_ATTRIB(Name);
2431 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2432 IMPL_DURATION_ATTRIB(CacheDuration,0);
2433 IMPL_TYPED_CHILD(Extensions);
2434 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2435 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2438 void prepareForMarshalling() const {
2440 declareNonVisibleNamespaces();
2443 void marshallAttributes(DOMElement* domElement) const {
2444 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2445 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2446 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2447 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2450 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2451 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2452 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2453 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2454 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2455 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2458 void processAttribute(const DOMAttr* attribute) {
2459 PROC_ID_ATTRIB(ID,ID,nullptr);
2460 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2461 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2462 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2466 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2467 public AbstractComplexElement,
2468 public AbstractDOMCachingXMLObject,
2469 public AbstractXMLObjectMarshaller,
2470 public AbstractXMLObjectUnmarshaller
2473 virtual ~EntityAttributesImpl() {}
2475 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2476 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2479 EntityAttributesImpl(const EntityAttributesImpl& src)
2480 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2481 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2483 Attribute* a=dynamic_cast<Attribute*>(*i);
2485 getAttributes().push_back(a->cloneAttribute());
2489 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2491 getAssertions().push_back(as->cloneAssertion());
2498 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2500 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2501 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2504 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2505 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2506 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2507 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2511 class SAML_DLLLOCAL DigestMethodImpl : public virtual DigestMethod,
2512 public AbstractComplexElement,
2513 public AbstractDOMCachingXMLObject,
2514 public AbstractXMLObjectMarshaller,
2515 public AbstractXMLObjectUnmarshaller
2518 virtual ~DigestMethodImpl() {
2519 XMLString::release(&m_Algorithm);
2522 DigestMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2523 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2524 m_Algorithm = nullptr;
2527 DigestMethodImpl(const DigestMethodImpl& src)
2528 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2529 setAlgorithm(src.getAlgorithm());
2530 VectorOf(XMLObject) v=getUnknownXMLObjects();
2531 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
2532 v.push_back((*i)->clone());
2535 IMPL_STRING_ATTRIB(Algorithm);
2537 IMPL_XMLOBJECT_CLONE(DigestMethod);
2538 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2541 void marshallAttributes(DOMElement* domElement) const {
2542 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2545 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2547 getUnknownXMLObjects().push_back(childXMLObject);
2550 void processAttribute(const DOMAttr* attribute) {
2551 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2555 class SAML_DLLLOCAL SigningMethodImpl : public virtual SigningMethod,
2556 public AbstractComplexElement,
2557 public AbstractDOMCachingXMLObject,
2558 public AbstractXMLObjectMarshaller,
2559 public AbstractXMLObjectUnmarshaller
2562 virtual ~SigningMethodImpl() {
2563 XMLString::release(&m_Algorithm);
2564 XMLString::release(&m_MinKeySize);
2565 XMLString::release(&m_MaxKeySize);
2568 SigningMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2569 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2570 m_Algorithm = nullptr;
2571 m_MinKeySize = nullptr;
2572 m_MaxKeySize = nullptr;
2575 SigningMethodImpl(const SigningMethodImpl& src)
2576 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2577 setAlgorithm(src.getAlgorithm());
2578 setMinKeySize(src.m_MinKeySize);
2579 setMaxKeySize(src.m_MaxKeySize);
2580 VectorOf(XMLObject) v=getUnknownXMLObjects();
2581 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
2582 v.push_back((*i)->clone());
2585 IMPL_XMLOBJECT_CLONE(SigningMethod);
2586 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2588 IMPL_STRING_ATTRIB(Algorithm);
2589 IMPL_INTEGER_ATTRIB(MinKeySize);
2590 IMPL_INTEGER_ATTRIB(MaxKeySize);
2593 void marshallAttributes(DOMElement* domElement) const {
2594 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2595 MARSHALL_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2596 MARSHALL_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2599 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2601 getUnknownXMLObjects().push_back(childXMLObject);
2604 void processAttribute(const DOMAttr* attribute) {
2605 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2606 PROC_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2607 PROC_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2611 class SAML_DLLLOCAL DisplayNameImpl : public virtual DisplayName, public localizedNameTypeImpl
2614 virtual ~DisplayNameImpl() {}
2616 DisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2617 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2619 DisplayNameImpl(const DisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2621 IMPL_XMLOBJECT_CLONE(DisplayName);
2622 localizedNameType* clonelocalizedNameType() const {
2623 return new DisplayNameImpl(*this);
2627 class SAML_DLLLOCAL DescriptionImpl : public virtual Description, public localizedNameTypeImpl
2630 virtual ~DescriptionImpl() {}
2632 DescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2633 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2635 DescriptionImpl(const DescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2637 IMPL_XMLOBJECT_CLONE(Description);
2638 localizedNameType* clonelocalizedNameType() const {
2639 return new DescriptionImpl(*this);
2643 class SAML_DLLLOCAL InformationURLImpl : public virtual InformationURL, public localizedURITypeImpl
2646 virtual ~InformationURLImpl() {}
2648 InformationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2649 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2651 InformationURLImpl(const InformationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2653 IMPL_XMLOBJECT_CLONE(InformationURL);
2654 localizedURIType* clonelocalizedURIType() const {
2655 return new InformationURLImpl(*this);
2659 class SAML_DLLLOCAL PrivacyStatementURLImpl : public virtual PrivacyStatementURL, public localizedURITypeImpl
2662 virtual ~PrivacyStatementURLImpl() {}
2664 PrivacyStatementURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2665 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2667 PrivacyStatementURLImpl(const PrivacyStatementURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2669 IMPL_XMLOBJECT_CLONE(PrivacyStatementURL);
2670 localizedURIType* clonelocalizedURIType() const {
2671 return new PrivacyStatementURLImpl(*this);
2675 class SAML_DLLLOCAL LogoImpl : public virtual Logo,
2676 public AbstractSimpleElement,
2677 public AbstractDOMCachingXMLObject,
2678 public AbstractXMLObjectMarshaller,
2679 public AbstractXMLObjectUnmarshaller
2683 m_LangPrefix=nullptr;
2694 virtual ~LogoImpl() {
2695 XMLString::release(&m_Lang);
2696 XMLString::release(&m_LangPrefix);
2697 XMLString::release(&m_Height);
2698 XMLString::release(&m_Width);
2701 LogoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2702 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2706 LogoImpl(const LogoImpl& src)
2707 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2709 setLang(src.getLang());
2710 if (src.m_LangPrefix)
2711 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
2712 setHeight(src.m_Height);
2713 setWidth(src.m_Width);
2716 IMPL_XMLOBJECT_CLONE(Logo);
2717 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2718 IMPL_INTEGER_ATTRIB(Height);
2719 IMPL_INTEGER_ATTRIB(Width);
2722 void marshallAttributes(DOMElement* domElement) const {
2723 if (m_Lang && *m_Lang) {
2724 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
2725 if (m_LangPrefix && *m_LangPrefix)
2726 attr->setPrefix(m_LangPrefix);
2727 attr->setNodeValue(m_Lang);
2728 domElement->setAttributeNodeNS(attr);
2730 MARSHALL_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2731 MARSHALL_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2734 void processAttribute(const DOMAttr* attribute) {
2735 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2736 setLang(attribute->getValue());
2737 const XMLCh* temp = attribute->getPrefix();
2738 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2739 m_LangPrefix = XMLString::replicate(temp);
2742 PROC_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2743 PROC_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2744 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2748 class SAML_DLLLOCAL UIInfoImpl : public virtual UIInfo,
2749 public AbstractComplexElement,
2750 public AbstractDOMCachingXMLObject,
2751 public AbstractXMLObjectMarshaller,
2752 public AbstractXMLObjectUnmarshaller
2755 virtual ~UIInfoImpl() {}
2757 UIInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2758 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2761 UIInfoImpl(const UIInfoImpl& src)
2762 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2763 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2765 DisplayName* dn=dynamic_cast<DisplayName*>(*i);
2767 getDisplayNames().push_back(dn->cloneDisplayName());
2771 Description* des=dynamic_cast<Description*>(*i);
2773 getDescriptions().push_back(des->cloneDescription());
2777 Logo* logo=dynamic_cast<Logo*>(*i);
2779 getLogos().push_back(logo->cloneLogo());
2783 InformationURL* inf=dynamic_cast<InformationURL*>(*i);
2785 getInformationURLs().push_back(inf->cloneInformationURL());
2789 PrivacyStatementURL* priv=dynamic_cast<PrivacyStatementURL*>(*i);
2791 getPrivacyStatementURLs().push_back(priv->clonePrivacyStatementURL());
2795 getUnknownXMLObjects().push_back((*i)->clone());
2800 IMPL_XMLOBJECT_CLONE(UIInfo);
2801 IMPL_TYPED_CHILDREN(DisplayName,m_children.end());
2802 IMPL_TYPED_CHILDREN(Description,m_children.end());
2803 IMPL_TYPED_CHILDREN(Logo,m_children.end());
2804 IMPL_TYPED_CHILDREN(InformationURL,m_children.end());
2805 IMPL_TYPED_CHILDREN(PrivacyStatementURL,m_children.end());
2806 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2809 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2810 PROC_TYPED_CHILDREN(DisplayName,SAML20MD_UI_NS,false);
2811 PROC_TYPED_CHILDREN(Description,SAML20MD_UI_NS,false);
2812 PROC_TYPED_CHILDREN(Logo,SAML20MD_UI_NS,false);
2813 PROC_TYPED_CHILDREN(InformationURL,SAML20MD_UI_NS,false);
2814 PROC_TYPED_CHILDREN(PrivacyStatementURL,SAML20MD_UI_NS,false);
2817 const XMLCh* nsURI=root->getNamespaceURI();
2818 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2819 getUnknownXMLObjects().push_back(childXMLObject);
2823 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2827 class SAML_DLLLOCAL DiscoHintsImpl : public virtual DiscoHints,
2828 public AbstractComplexElement,
2829 public AbstractDOMCachingXMLObject,
2830 public AbstractXMLObjectMarshaller,
2831 public AbstractXMLObjectUnmarshaller
2834 virtual ~DiscoHintsImpl() {}
2836 DiscoHintsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2837 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2840 DiscoHintsImpl(const DiscoHintsImpl& src)
2841 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2842 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2844 IPHint* ip=dynamic_cast<IPHint*>(*i);
2846 getIPHints().push_back(ip->cloneIPHint());
2850 DomainHint* dom=dynamic_cast<DomainHint*>(*i);
2852 getDomainHints().push_back(dom->cloneDomainHint());
2856 GeolocationHint* geo=dynamic_cast<GeolocationHint*>(*i);
2858 getGeolocationHints().push_back(geo->cloneGeolocationHint());
2862 getUnknownXMLObjects().push_back((*i)->clone());
2867 IMPL_XMLOBJECT_CLONE(DiscoHints);
2868 IMPL_TYPED_CHILDREN(IPHint,m_children.end());
2869 IMPL_TYPED_CHILDREN(DomainHint,m_children.end());
2870 IMPL_TYPED_CHILDREN(GeolocationHint,m_children.end());
2871 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2874 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2875 PROC_TYPED_CHILDREN(IPHint,SAML20MD_UI_NS,false);
2876 PROC_TYPED_CHILDREN(DomainHint,SAML20MD_UI_NS,false);
2877 PROC_TYPED_CHILDREN(GeolocationHint,SAML20MD_UI_NS,false);
2880 const XMLCh* nsURI=root->getNamespaceURI();
2881 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2882 getUnknownXMLObjects().push_back(childXMLObject);
2886 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2893 #if defined (_MSC_VER)
2894 #pragma warning( pop )
2897 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2898 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2899 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2900 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2901 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2902 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2903 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2904 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2906 // Builder Implementations
2908 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2909 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2910 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2911 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2912 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2913 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2914 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2915 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2916 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2917 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2918 IMPL_XMLOBJECTBUILDER(AttributeService);
2919 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2920 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2921 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2922 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2923 IMPL_XMLOBJECTBUILDER(AuthzService);
2924 IMPL_XMLOBJECTBUILDER(Company);
2925 IMPL_XMLOBJECTBUILDER(ContactPerson);
2926 IMPL_XMLOBJECTBUILDER(EmailAddress);
2927 IMPL_XMLOBJECTBUILDER(EndpointType);
2928 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2929 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2930 IMPL_XMLOBJECTBUILDER(Extensions);
2931 IMPL_XMLOBJECTBUILDER(GivenName);
2932 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2933 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2934 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2935 IMPL_XMLOBJECTBUILDER(localizedNameType);
2936 IMPL_XMLOBJECTBUILDER(localizedURIType);
2937 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2938 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2939 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2940 IMPL_XMLOBJECTBUILDER(Organization);
2941 IMPL_XMLOBJECTBUILDER(OrganizationName);
2942 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2943 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2944 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2945 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2946 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2947 IMPL_XMLOBJECTBUILDER(ServiceName);
2948 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2949 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2950 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2951 IMPL_XMLOBJECTBUILDER(SurName);
2952 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2954 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2955 IMPL_XMLOBJECTBUILDER(SourceID);
2956 IMPL_XMLOBJECTBUILDER(EntityAttributes);
2957 IMPL_XMLOBJECTBUILDER(DigestMethod);
2958 IMPL_XMLOBJECTBUILDER(SigningMethod);
2959 IMPL_XMLOBJECTBUILDER(DisplayName);
2960 IMPL_XMLOBJECTBUILDER(Description);
2961 IMPL_XMLOBJECTBUILDER(Logo);
2962 IMPL_XMLOBJECTBUILDER(InformationURL);
2963 IMPL_XMLOBJECTBUILDER(PrivacyStatementURL);
2964 IMPL_XMLOBJECTBUILDER(UIInfo);
2965 IMPL_XMLOBJECTBUILDER(IPHint);
2966 IMPL_XMLOBJECTBUILDER(DomainHint);
2967 IMPL_XMLOBJECTBUILDER(GeolocationHint);
2968 IMPL_XMLOBJECTBUILDER(DiscoHints);
2970 #ifdef HAVE_COVARIANT_RETURNS
2971 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2973 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2975 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
2978 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2981 const DigestMethod* RoleDescriptor::getDigestMethod() const
2983 bool roleLevel = false;
2984 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
2986 if (getExtensions()) {
2987 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
2988 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2989 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
2991 if (dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
2999 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3000 if (entity && entity->getExtensions()) {
3001 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3002 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3003 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
3004 if (dm && dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
3013 pair<const SigningMethod*,const Credential*> RoleDescriptor::getSigningMethod(const CredentialResolver& resolver, CredentialCriteria& cc) const
3015 bool roleLevel = false;
3016 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
3018 if (getExtensions()) {
3019 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
3020 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3021 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3024 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3025 cc.setXMLAlgorithm(sm->getAlgorithm());
3026 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3027 if (minsize.first || maxsize.first) {
3028 cc.setKeySize(minsize.first ? minsize.second : 0);
3029 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3033 cc.setMaxKeySize(0);
3035 const Credential* cred = resolver.resolve(&cc);
3037 return make_pair(sm, cred);
3044 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
3045 if (entity && entity->getExtensions()) {
3046 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
3047 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
3048 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
3050 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
3051 cc.setXMLAlgorithm(sm->getAlgorithm());
3052 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
3053 if (minsize.first || maxsize.first) {
3054 cc.setKeySize(minsize.first ? minsize.second : 0);
3055 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
3059 cc.setMaxKeySize(0);
3061 const Credential* cred = resolver.resolve(&cc);
3063 return make_pair(sm, cred);
3071 cc.setMaxKeySize(0);
3072 cc.setXMLAlgorithm(nullptr);
3073 return pair<const SigningMethod*,const Credential*>(nullptr, resolver.resolve(&cc));
3076 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
3077 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);
3078 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);
3079 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
3080 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
3081 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);
3082 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);
3083 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3084 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);
3085 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);
3086 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);
3087 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);
3088 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);
3089 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);
3090 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);
3091 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);
3092 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3093 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3094 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
3095 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3096 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);
3097 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
3098 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);
3099 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);
3100 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3101 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);
3102 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);
3103 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3104 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);
3105 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
3106 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
3107 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
3108 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
3109 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
3110 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
3111 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
3112 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
3113 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
3114 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
3115 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
3116 const XMLCh Description::LOCAL_NAME[] = UNICODE_LITERAL_11(D,e,s,c,r,i,p,t,i,o,n);
3117 const XMLCh DigestMethod::LOCAL_NAME[] = UNICODE_LITERAL_12(D,i,g,e,s,t,M,e,t,h,o,d);
3118 const XMLCh DigestMethod::TYPE_NAME[] = UNICODE_LITERAL_16(D,i,g,e,s,t,M,e,t,h,o,d,T,y,p,e);
3119 const XMLCh DigestMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3120 const XMLCh DiscoHints::LOCAL_NAME[] = UNICODE_LITERAL_10(D,i,s,c,o,H,i,n,t,s);
3121 const XMLCh DiscoHints::TYPE_NAME[] = UNICODE_LITERAL_14(D,i,s,c,o,H,i,n,t,s,T,y,p,e);
3122 const XMLCh DisplayName::LOCAL_NAME[] = UNICODE_LITERAL_11(D,i,s,p,l,a,y,N,a,m,e);
3123 const XMLCh DomainHint::LOCAL_NAME[] = UNICODE_LITERAL_10(D,o,m,a,i,n,H,i,n,t);
3124 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
3125 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
3126 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
3127 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
3128 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
3129 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);
3130 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);
3131 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);
3132 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3133 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
3134 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
3135 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);
3136 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3137 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
3138 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
3139 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);
3140 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
3141 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
3142 const XMLCh GeolocationHint::LOCAL_NAME[] = UNICODE_LITERAL_15(G,e,o,l,o,c,a,t,i,o,n,H,i,n,t);
3143 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
3144 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3145 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);
3146 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);
3147 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
3148 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);
3149 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
3150 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
3151 const XMLCh InformationURL::LOCAL_NAME[] = UNICODE_LITERAL_14(I,n,f,o,r,m,a,t,i,o,n,U,R,L);
3152 const XMLCh IPHint::LOCAL_NAME[] = UNICODE_LITERAL_6(I,P,H,i,n,t);
3153 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
3154 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);
3155 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
3156 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
3157 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
3158 const XMLCh Logo::LOCAL_NAME[] = UNICODE_LITERAL_4(L,o,g,o);
3159 const XMLCh Logo::TYPE_NAME[] = UNICODE_LITERAL_8(L,o,g,o,T,y,p,e);
3160 const XMLCh Logo::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3161 const XMLCh Logo::HEIGHT_ATTRIB_NAME[] = UNICODE_LITERAL_6(h,e,i,g,h,t);
3162 const XMLCh Logo::WIDTH_ATTRIB_NAME[] = UNICODE_LITERAL_5(w,i,d,t,h);
3163 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
3164 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);
3165 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3166 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
3167 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
3168 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
3169 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);
3170 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
3171 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);
3172 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
3173 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
3174 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
3175 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);
3176 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
3177 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
3178 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);
3179 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);
3180 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
3181 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);
3182 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);
3183 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);
3184 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);
3185 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
3186 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
3187 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
3188 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);
3189 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
3190 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);
3191 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
3192 const XMLCh SigningMethod::LOCAL_NAME[] = UNICODE_LITERAL_13(S,i,g,n,i,n,g,M,e,t,h,o,d);
3193 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);
3194 const XMLCh SigningMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
3195 const XMLCh SigningMethod::MINKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,i,n,K,e,y,S,i,z,e);
3196 const XMLCh SigningMethod::MAXKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,a,x,K,e,y,S,i,z,e);
3197 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);
3198 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);
3199 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
3200 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
3201 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);
3202 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);
3203 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);
3204 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
3205 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);
3206 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
3207 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
3208 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
3209 const XMLCh UIInfo::LOCAL_NAME[] = UNICODE_LITERAL_6(U,I,I,n,f,o);
3210 const XMLCh UIInfo::TYPE_NAME[] = UNICODE_LITERAL_10(U,I,I,n,f,o,T,y,p,e);