2 * Licensed to the University Corporation for Advanced Internet
3 * Development, Inc. (UCAID) under one or more contributor license
4 * agreements. See the NOTICE file distributed with this work for
5 * additional information regarding copyright ownership.
7 * UCAID licenses this file to you under the Apache License,
8 * Version 2.0 (the "License"); you may not use this file except
9 * in compliance with the License. You may obtain a copy of the
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17 * either express or implied. See the License for the specific
18 * language governing permissions and limitations under the License.
24 * Implementation classes for SAML 2.0 Metadata schema.
28 #include "exceptions.h"
29 #include "saml2/metadata/Metadata.h"
30 #include "signature/ContentReference.h"
32 #include <xmltooling/AbstractComplexElement.h>
33 #include <xmltooling/AbstractSimpleElement.h>
34 #include <xmltooling/XMLToolingConfig.h>
35 #include <xmltooling/encryption/Encryption.h>
36 #include <xmltooling/impl/AnyElement.h>
37 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
38 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
39 #include <xmltooling/security/CredentialCriteria.h>
40 #include <xmltooling/security/CredentialResolver.h>
41 #include <xmltooling/signature/KeyInfo.h>
42 #include <xmltooling/signature/Signature.h>
43 #include <xmltooling/util/DateTime.h>
44 #include <xmltooling/util/XMLHelper.h>
47 #include <boost/lambda/bind.hpp>
48 #include <boost/lambda/if.hpp>
49 #include <boost/lambda/lambda.hpp>
50 #include <xercesc/util/XMLUniDefs.hpp>
51 #include <xsec/framework/XSECDefs.hpp>
53 using namespace samlconstants;
54 using namespace opensaml::saml2md;
55 using namespace opensaml::saml2;
56 using namespace xmlencryption;
57 using namespace xmlsignature;
58 using namespace xmltooling;
60 using xmlconstants::XMLSIG_NS;
61 using xmlconstants::XML_BOOL_NULL;
63 #if defined (_MSC_VER)
64 #pragma warning( push )
65 #pragma warning( disable : 4250 4251 )
71 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
72 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
73 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
74 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
75 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
76 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
77 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
78 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
80 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
81 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
82 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,IPHint);
83 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,DomainHint);
84 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GeolocationHint);
86 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
87 public AbstractSimpleElement,
88 public AbstractDOMCachingXMLObject,
89 public AbstractXMLObjectMarshaller,
90 public AbstractXMLObjectUnmarshaller
98 localizedNameTypeImpl() {
103 virtual ~localizedNameTypeImpl() {
104 XMLString::release(&m_Lang);
105 XMLString::release(&m_LangPrefix);
108 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
109 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
113 localizedNameTypeImpl(const localizedNameTypeImpl& src)
114 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
118 void _clone(const localizedNameTypeImpl& src) {
119 IMPL_CLONE_FOREIGN_ATTRIB(Lang);
122 IMPL_XMLOBJECT_CLONE_EX(localizedNameType);
123 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
126 void marshallAttributes(DOMElement* domElement) const {
127 if (m_Lang && *m_Lang) {
128 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
129 if (m_LangPrefix && *m_LangPrefix)
130 attr->setPrefix(m_LangPrefix);
132 attr->setPrefix(xmlconstants::XML_PREFIX);
133 attr->setNodeValue(m_Lang);
134 domElement->setAttributeNodeNS(attr);
138 void processAttribute(const DOMAttr* attribute) {
139 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
140 setLang(attribute->getValue());
141 const XMLCh* temp = attribute->getPrefix();
142 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
143 m_LangPrefix = XMLString::replicate(temp);
146 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
150 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
151 public AbstractSimpleElement,
152 public AbstractDOMCachingXMLObject,
153 public AbstractXMLObjectMarshaller,
154 public AbstractXMLObjectUnmarshaller
158 m_LangPrefix=nullptr;
162 localizedURITypeImpl() {
167 virtual ~localizedURITypeImpl() {
168 XMLString::release(&m_Lang);
169 XMLString::release(&m_LangPrefix);
172 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
173 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
177 localizedURITypeImpl(const localizedURITypeImpl& src)
178 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
182 void _clone(const localizedURITypeImpl& src) {
183 IMPL_CLONE_FOREIGN_ATTRIB(Lang);
186 IMPL_XMLOBJECT_CLONE_EX(localizedURIType);
187 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
190 void marshallAttributes(DOMElement* domElement) const {
191 if (m_Lang && *m_Lang) {
192 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
193 if (m_LangPrefix && *m_LangPrefix)
194 attr->setPrefix(m_LangPrefix);
196 attr->setPrefix(xmlconstants::XML_PREFIX);
197 attr->setNodeValue(m_Lang);
198 domElement->setAttributeNodeNS(attr);
202 void processAttribute(const DOMAttr* attribute) {
203 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
204 setLang(attribute->getValue());
205 const XMLCh* temp = attribute->getPrefix();
206 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
207 m_LangPrefix = XMLString::replicate(temp);
210 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
214 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
217 virtual ~OrganizationNameImpl() {}
219 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
220 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
222 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
224 IMPL_XMLOBJECT_CLONE_EX(OrganizationName);
227 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
230 virtual ~OrganizationDisplayNameImpl() {}
232 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
233 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
235 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
237 IMPL_XMLOBJECT_CLONE_EX(OrganizationDisplayName);
240 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
243 virtual ~OrganizationURLImpl() {}
245 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
246 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
248 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
250 IMPL_XMLOBJECT_CLONE_EX(OrganizationURL);
253 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
256 virtual ~ServiceNameImpl() {}
258 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
259 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
261 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
263 IMPL_XMLOBJECT_CLONE_EX(ServiceName);
266 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
269 virtual ~ServiceDescriptionImpl() {}
271 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
272 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
274 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
276 IMPL_XMLOBJECT_CLONE_EX(ServiceDescription);
279 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
280 public AbstractComplexElement,
281 public AbstractDOMCachingXMLObject,
282 public AbstractXMLObjectMarshaller,
283 public AbstractXMLObjectUnmarshaller
286 virtual ~ExtensionsImpl() {}
288 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
289 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
292 ExtensionsImpl(const ExtensionsImpl& src)
293 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
294 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
297 IMPL_XMLOBJECT_CLONE(Extensions);
298 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
301 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
303 const XMLCh* nsURI=root->getNamespaceURI();
304 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
305 getUnknownXMLObjects().push_back(childXMLObject);
309 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
313 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
314 public AbstractComplexElement,
315 public AbstractAttributeExtensibleXMLObject,
316 public AbstractDOMCachingXMLObject,
317 public AbstractXMLObjectMarshaller,
318 public AbstractXMLObjectUnmarshaller
320 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
321 list<XMLObject*>::iterator m_pos_OrganizationURL;
324 m_children.push_back(nullptr);
325 m_children.push_back(nullptr);
326 m_children.push_back(nullptr);
327 m_Extensions=nullptr;
328 m_pos_Extensions=m_children.begin();
329 m_pos_OrganizationDisplayName=m_pos_Extensions;
330 ++m_pos_OrganizationDisplayName;
331 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
332 ++m_pos_OrganizationURL;
336 virtual ~OrganizationImpl() {}
338 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
339 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
343 OrganizationImpl(const OrganizationImpl& src)
344 : AbstractXMLObject(src), AbstractComplexElement(src),
345 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
347 IMPL_CLONE_TYPED_CHILD(Extensions);
348 IMPL_CLONE_TYPED_CHILDREN(OrganizationName);
349 IMPL_CLONE_TYPED_CHILDREN(OrganizationDisplayName);
350 IMPL_CLONE_TYPED_CHILDREN(OrganizationURL);
353 IMPL_XMLOBJECT_CLONE(Organization);
354 IMPL_TYPED_CHILD(Extensions);
355 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
356 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
357 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
360 void marshallAttributes(DOMElement* domElement) const {
361 marshallExtensionAttributes(domElement);
364 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
365 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
366 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
367 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
368 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
369 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
372 void processAttribute(const DOMAttr* attribute) {
373 unmarshallExtensionAttribute(attribute);
377 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
378 public AbstractComplexElement,
379 public AbstractAttributeExtensibleXMLObject,
380 public AbstractDOMCachingXMLObject,
381 public AbstractXMLObjectMarshaller,
382 public AbstractXMLObjectUnmarshaller
384 list<XMLObject*>::iterator m_pos_TelephoneNumber;
387 m_ContactType=nullptr;
388 m_children.push_back(nullptr);
389 m_children.push_back(nullptr);
390 m_children.push_back(nullptr);
391 m_children.push_back(nullptr);
392 m_children.push_back(nullptr);
393 m_Extensions=nullptr;
397 m_pos_Extensions=m_children.begin();
398 m_pos_Company=m_pos_Extensions;
400 m_pos_GivenName=m_pos_Company;
402 m_pos_SurName=m_pos_GivenName;
404 m_pos_TelephoneNumber=m_pos_SurName;
405 ++m_pos_TelephoneNumber;
409 virtual ~ContactPersonImpl() {
410 XMLString::release(&m_ContactType);
413 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
414 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
418 ContactPersonImpl(const ContactPersonImpl& src)
419 : AbstractXMLObject(src), AbstractComplexElement(src),
420 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
422 IMPL_CLONE_ATTRIB(ContactType);
423 IMPL_CLONE_TYPED_CHILD(Extensions);
424 IMPL_CLONE_TYPED_CHILD(Company);
425 IMPL_CLONE_TYPED_CHILD(GivenName);
426 IMPL_CLONE_TYPED_CHILD(SurName);
427 IMPL_CLONE_TYPED_CHILDREN(EmailAddress);
428 IMPL_CLONE_TYPED_CHILDREN(TelephoneNumber);
431 IMPL_XMLOBJECT_CLONE(ContactPerson);
432 IMPL_STRING_ATTRIB(ContactType);
433 IMPL_TYPED_CHILD(Extensions);
434 IMPL_TYPED_CHILD(Company);
435 IMPL_TYPED_CHILD(GivenName);
436 IMPL_TYPED_CHILD(SurName);
437 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
438 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
440 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
441 if (!qualifiedName.hasNamespaceURI()) {
442 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
443 setContactType(value);
447 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
451 void marshallAttributes(DOMElement* domElement) const {
452 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
453 marshallExtensionAttributes(domElement);
456 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
457 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
458 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
459 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
460 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
461 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
462 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
463 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
466 void processAttribute(const DOMAttr* attribute) {
467 unmarshallExtensionAttribute(attribute);
471 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
472 public AbstractSimpleElement,
473 public AbstractDOMCachingXMLObject,
474 public AbstractXMLObjectMarshaller,
475 public AbstractXMLObjectUnmarshaller
482 virtual ~AdditionalMetadataLocationImpl() {
483 XMLString::release(&m_Namespace);
486 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
487 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
491 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
492 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
494 IMPL_CLONE_ATTRIB(Namespace);
497 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
498 IMPL_STRING_ATTRIB(Namespace);
501 void marshallAttributes(DOMElement* domElement) const {
502 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
505 void processAttribute(const DOMAttr* attribute) {
506 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
507 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
511 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
512 public AbstractComplexElement,
513 public AbstractDOMCachingXMLObject,
514 public AbstractXMLObjectMarshaller,
515 public AbstractXMLObjectUnmarshaller
520 m_children.push_back(nullptr);
521 m_pos_KeyInfo=m_children.begin();
525 virtual ~KeyDescriptorImpl() {
526 XMLString::release(&m_Use);
529 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
530 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
534 KeyDescriptorImpl(const KeyDescriptorImpl& src)
535 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
537 IMPL_CLONE_ATTRIB(Use);
538 IMPL_CLONE_TYPED_CHILD(KeyInfo);
539 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption);
542 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
543 IMPL_STRING_ATTRIB(Use);
544 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
545 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
548 void marshallAttributes(DOMElement* domElement) const {
549 MARSHALL_STRING_ATTRIB(Use,USE,nullptr);
552 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
553 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
554 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
555 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
558 void processAttribute(const DOMAttr* attribute) {
559 PROC_STRING_ATTRIB(Use,USE,nullptr);
560 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
564 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
565 public AbstractAttributeExtensibleXMLObject,
566 public AbstractComplexElement,
567 public AbstractDOMCachingXMLObject,
568 public AbstractXMLObjectMarshaller,
569 public AbstractXMLObjectUnmarshaller
572 m_Binding=m_Location=m_ResponseLocation=nullptr;
581 virtual ~EndpointTypeImpl() {
582 XMLString::release(&m_Binding);
583 XMLString::release(&m_Location);
584 XMLString::release(&m_ResponseLocation);
587 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
588 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
592 EndpointTypeImpl(const EndpointTypeImpl& src)
593 : AbstractXMLObject(src),
594 AbstractAttributeExtensibleXMLObject(src),
595 AbstractComplexElement(src),
596 AbstractDOMCachingXMLObject(src) {
600 void _clone(const EndpointTypeImpl& src) {
601 IMPL_CLONE_ATTRIB(Binding);
602 IMPL_CLONE_ATTRIB(Location);
603 IMPL_CLONE_ATTRIB(ResponseLocation);
604 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
607 IMPL_XMLOBJECT_CLONE_EX(EndpointType);
608 IMPL_STRING_ATTRIB(Binding);
609 IMPL_STRING_ATTRIB(Location);
610 IMPL_STRING_ATTRIB(ResponseLocation);
611 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
613 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
614 if (!qualifiedName.hasNamespaceURI()) {
615 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
619 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
623 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
624 setResponseLocation(value);
628 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
631 void marshallAttributes(DOMElement* domElement) const {
632 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
633 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
634 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
635 marshallExtensionAttributes(domElement);
638 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
640 const XMLCh* nsURI=root->getNamespaceURI();
641 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
642 getUnknownXMLObjects().push_back(childXMLObject);
645 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
648 void processAttribute(const DOMAttr* attribute) {
649 unmarshallExtensionAttribute(attribute);
653 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
657 m_isDefault=XML_BOOL_NULL;
661 IndexedEndpointTypeImpl() {
665 virtual ~IndexedEndpointTypeImpl() {
666 XMLString::release(&m_Index);
669 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
670 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
674 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
678 void _clone(const IndexedEndpointTypeImpl& src) {
679 EndpointTypeImpl::_clone(src);
680 IMPL_CLONE_INTEGER_ATTRIB(Index);
681 IMPL_CLONE_BOOLEAN_ATTRIB(isDefault);
684 IMPL_XMLOBJECT_CLONE_EX(IndexedEndpointType);
685 IMPL_INTEGER_ATTRIB(Index);
686 IMPL_BOOLEAN_ATTRIB(isDefault);
688 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
689 if (!qualifiedName.hasNamespaceURI()) {
690 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
694 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
699 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
703 void marshallAttributes(DOMElement* domElement) const {
704 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
705 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
706 EndpointTypeImpl::marshallAttributes(domElement);
710 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
713 virtual ~ArtifactResolutionServiceImpl() {}
715 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
716 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
718 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
720 IMPL_XMLOBJECT_CLONE_EX(ArtifactResolutionService);
723 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
726 virtual ~SingleLogoutServiceImpl() {}
728 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
729 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
731 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
733 IMPL_XMLOBJECT_CLONE_EX(SingleLogoutService);
736 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
739 virtual ~ManageNameIDServiceImpl() {}
741 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
742 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
744 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
746 IMPL_XMLOBJECT_CLONE_EX(ManageNameIDService);
749 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
752 virtual ~SingleSignOnServiceImpl() {}
754 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
755 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
757 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
759 IMPL_XMLOBJECT_CLONE_EX(SingleSignOnService);
762 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
765 virtual ~NameIDMappingServiceImpl() {}
767 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
768 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
770 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
772 IMPL_XMLOBJECT_CLONE_EX(NameIDMappingService);
775 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
778 virtual ~AssertionIDRequestServiceImpl() {}
780 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
781 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
783 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
785 IMPL_XMLOBJECT_CLONE_EX(AssertionIDRequestService);
788 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
791 virtual ~AssertionConsumerServiceImpl() {}
793 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
794 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
796 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
798 IMPL_XMLOBJECT_CLONE_EX(AssertionConsumerService);
801 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
804 virtual ~AuthnQueryServiceImpl() {}
806 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
807 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
809 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
811 IMPL_XMLOBJECT_CLONE_EX(AuthnQueryService);
814 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
817 virtual ~AuthzServiceImpl() {}
819 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
820 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
822 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
824 IMPL_XMLOBJECT_CLONE_EX(AuthzService);
827 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
830 virtual ~AttributeServiceImpl() {}
832 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
833 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
835 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
837 IMPL_XMLOBJECT_CLONE_EX(AttributeService);
840 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
841 public virtual SignableObject,
842 public AbstractComplexElement,
843 public AbstractAttributeExtensibleXMLObject,
844 public AbstractDOMCachingXMLObject,
845 public AbstractXMLObjectMarshaller,
846 public AbstractXMLObjectUnmarshaller
849 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
850 m_ValidUntil=m_CacheDuration=nullptr;
851 m_children.push_back(nullptr);
852 m_children.push_back(nullptr);
853 m_children.push_back(nullptr);
854 m_children.push_back(nullptr);
856 m_Extensions=nullptr;
857 m_Organization=nullptr;
858 m_pos_Signature=m_children.begin();
859 m_pos_Extensions=m_pos_Signature;
861 m_pos_Organization=m_pos_Extensions;
862 ++m_pos_Organization;
863 m_pos_ContactPerson=m_pos_Organization;
864 ++m_pos_ContactPerson;
868 list<XMLObject*>::iterator m_pos_ContactPerson;
870 RoleDescriptorImpl() {
875 virtual ~RoleDescriptorImpl() {
876 XMLString::release(&m_ID);
877 XMLString::release(&m_ProtocolSupportEnumeration);
878 XMLString::release(&m_ErrorURL);
880 delete m_CacheDuration;
883 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
884 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
888 RoleDescriptorImpl(const RoleDescriptorImpl& src)
889 : AbstractXMLObject(src), AbstractComplexElement(src),
890 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
894 void _clone(const RoleDescriptorImpl& src) {
895 IMPL_CLONE_ATTRIB(ID);
896 IMPL_CLONE_ATTRIB(ProtocolSupportEnumeration);
897 IMPL_CLONE_ATTRIB(ErrorURL);
898 IMPL_CLONE_ATTRIB(ValidUntil);
899 IMPL_CLONE_ATTRIB(CacheDuration);
900 IMPL_CLONE_TYPED_CHILD(Signature);
901 IMPL_CLONE_TYPED_CHILD(Extensions);
902 IMPL_CLONE_TYPED_CHILD(Organization);
903 IMPL_CLONE_TYPED_CHILDREN(KeyDescriptor);
904 IMPL_CLONE_TYPED_CHILDREN(ContactPerson);
907 //IMPL_TYPED_CHILD(Signature);
908 // Need customized setter.
910 Signature* m_Signature;
911 list<XMLObject*>::iterator m_pos_Signature;
913 Signature* getSignature() const {
917 void setSignature(Signature* sig) {
918 prepareForAssignment(m_Signature,sig);
919 *m_pos_Signature=m_Signature=sig;
920 // Sync content reference back up.
922 m_Signature->setContentReference(new opensaml::ContentReference(*this));
925 RoleDescriptor* cloneRoleDescriptor() const {
926 return dynamic_cast<RoleDescriptor*>(clone());
929 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
930 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
931 IMPL_STRING_ATTRIB(ErrorURL);
932 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
933 IMPL_DURATION_ATTRIB(CacheDuration,0);
934 IMPL_TYPED_CHILD(Extensions);
935 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
936 IMPL_TYPED_CHILD(Organization);
937 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
939 bool hasSupport(const XMLCh* protocol) const {
940 if (!protocol || !*protocol)
942 if (m_ProtocolSupportEnumeration) {
943 // Look for first character.
944 xsecsize_t len=XMLString::stringLen(protocol);
946 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
948 // Only possible match is if it's the first character or a space comes before it.
949 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
950 // See if rest of protocol string is present.
951 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
952 // Only possible match is if it's the last character or a space comes after it.
953 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
959 // Move past last search and start again.
964 // Move past last search and start again.
967 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
973 void addSupport(const XMLCh* protocol) {
974 if (hasSupport(protocol))
976 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
978 xstring pse(m_ProtocolSupportEnumeration);
979 pse = pse + chSpace + protocol;
980 setProtocolSupportEnumeration(pse.c_str());
982 auto_ptr_char temp(m_ProtocolSupportEnumeration);
983 auto_ptr_char temp2(protocol);
984 string pse(temp.get());
985 pse = pse + ' ' + temp2.get();
986 auto_ptr_XMLCh temp3(pse.c_str());
987 setProtocolSupportEnumeration(temp3.get());
991 setProtocolSupportEnumeration(protocol);
995 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
996 if (!qualifiedName.hasNamespaceURI()) {
997 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1001 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1002 setProtocolSupportEnumeration(value);
1005 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1009 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1010 setValidUntil(value);
1013 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1014 setCacheDuration(value);
1018 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1022 void prepareForMarshalling() const {
1024 declareNonVisibleNamespaces();
1027 void marshallAttributes(DOMElement* domElement) const {
1028 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1029 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
1030 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
1031 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1032 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1033 marshallExtensionAttributes(domElement);
1036 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1037 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1038 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1039 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1040 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1041 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1042 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1045 void processAttribute(const DOMAttr* attribute) {
1046 PROC_ID_ATTRIB(ID,ID,nullptr);
1047 unmarshallExtensionAttribute(attribute);
1051 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1054 virtual ~RoleDescriptorTypeImpl() {}
1056 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1057 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1060 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1063 void _clone(const RoleDescriptorTypeImpl& src) {
1064 RoleDescriptorImpl::_clone(src);
1065 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
1068 IMPL_XMLOBJECT_CLONE_EX(RoleDescriptorType);
1069 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1072 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1073 getUnknownXMLObjects().push_back(childXMLObject);
1077 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1080 m_children.push_back(nullptr);
1081 m_children.push_back(nullptr);
1082 m_children.push_back(nullptr);
1083 m_children.push_back(nullptr);
1084 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1085 ++m_pos_ArtifactResolutionService;
1086 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1087 ++m_pos_SingleLogoutService;
1088 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1089 ++m_pos_ManageNameIDService;
1090 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1091 ++m_pos_NameIDFormat;
1095 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1096 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1097 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1098 list<XMLObject*>::iterator m_pos_NameIDFormat;
1100 SSODescriptorTypeImpl() {
1105 virtual ~SSODescriptorTypeImpl() {}
1107 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1108 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1112 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1116 void _clone(const SSODescriptorTypeImpl& src) {
1117 RoleDescriptorImpl::_clone(src);
1118 IMPL_CLONE_TYPED_CHILDREN(ArtifactResolutionService);
1119 IMPL_CLONE_TYPED_CHILDREN(SingleLogoutService);
1120 IMPL_CLONE_TYPED_CHILDREN(ManageNameIDService);
1121 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1124 SSODescriptorType* cloneSSODescriptorType() const {
1125 return dynamic_cast<SSODescriptorType*>(clone());
1128 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1129 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1130 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1131 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1134 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1135 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1136 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1137 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1138 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1139 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1143 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1145 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1146 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1147 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1148 list<XMLObject*>::iterator m_pos_AttributeProfile;
1151 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1152 m_children.push_back(nullptr);
1153 m_children.push_back(nullptr);
1154 m_children.push_back(nullptr);
1155 m_children.push_back(nullptr);
1156 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1157 ++m_pos_SingleSignOnService;
1158 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1159 ++m_pos_NameIDMappingService;
1160 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1161 ++m_pos_AssertionIDRequestService;
1162 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1163 ++m_pos_AttributeProfile;
1167 virtual ~IDPSSODescriptorImpl() {}
1169 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1170 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1174 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1178 void _clone(const IDPSSODescriptorImpl& src) {
1179 SSODescriptorTypeImpl::_clone(src);
1180 IMPL_CLONE_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1181 IMPL_CLONE_TYPED_CHILDREN(SingleSignOnService);
1182 IMPL_CLONE_TYPED_CHILDREN(NameIDMappingService);
1183 IMPL_CLONE_TYPED_CHILDREN(AssertionIDRequestService);
1184 IMPL_CLONE_TYPED_CHILDREN(AttributeProfile);
1185 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(Attribute,saml2);
1188 IMPL_XMLOBJECT_CLONE_EX(IDPSSODescriptor);
1189 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1190 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1191 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1192 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1193 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1194 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1196 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1197 if (!qualifiedName.hasNamespaceURI()) {
1198 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1199 setWantAuthnRequestsSigned(value);
1203 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1207 void marshallAttributes(DOMElement* domElement) const {
1208 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1209 RoleDescriptorImpl::marshallAttributes(domElement);
1212 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1213 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1214 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1215 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1216 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1217 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1218 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1222 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1223 public AbstractComplexElement,
1224 public AbstractAttributeExtensibleXMLObject,
1225 public AbstractDOMCachingXMLObject,
1226 public AbstractXMLObjectMarshaller,
1227 public AbstractXMLObjectUnmarshaller
1230 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1231 m_isRequired=XML_BOOL_NULL;
1235 virtual ~RequestedAttributeImpl() {
1236 XMLString::release(&m_Name);
1237 XMLString::release(&m_NameFormat);
1238 XMLString::release(&m_FriendlyName);
1241 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1242 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1246 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1247 : AbstractXMLObject(src), AbstractComplexElement(src),
1248 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1250 IMPL_CLONE_ATTRIB(Name);
1251 IMPL_CLONE_ATTRIB(NameFormat);
1252 IMPL_CLONE_ATTRIB(FriendlyName);
1253 IMPL_CLONE_BOOLEAN_ATTRIB(isRequired);
1254 IMPL_CLONE_XMLOBJECT_CHILDREN(AttributeValue);
1257 IMPL_XMLOBJECT_CLONE2(RequestedAttribute,Attribute);
1258 IMPL_STRING_ATTRIB(Name);
1259 IMPL_STRING_ATTRIB(NameFormat);
1260 IMPL_STRING_ATTRIB(FriendlyName);
1261 IMPL_BOOLEAN_ATTRIB(isRequired);
1262 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1264 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1265 if (!qualifiedName.hasNamespaceURI()) {
1266 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1270 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1271 setNameFormat(value);
1274 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1275 setFriendlyName(value);
1278 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1279 setisRequired(value);
1283 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1287 void marshallAttributes(DOMElement* domElement) const {
1288 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1289 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1290 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1291 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1292 marshallExtensionAttributes(domElement);
1295 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1296 getAttributeValues().push_back(childXMLObject);
1299 void processAttribute(const DOMAttr* attribute) {
1300 unmarshallExtensionAttribute(attribute);
1304 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1305 public AbstractComplexElement,
1306 public AbstractDOMCachingXMLObject,
1307 public AbstractXMLObjectMarshaller,
1308 public AbstractXMLObjectUnmarshaller
1310 list<XMLObject*>::iterator m_pos_ServiceDescription;
1311 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1315 m_isDefault=XML_BOOL_NULL;
1316 m_children.push_back(nullptr);
1317 m_children.push_back(nullptr);
1318 m_pos_ServiceDescription=m_children.begin();
1319 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1320 ++m_pos_RequestedAttribute;
1324 virtual ~AttributeConsumingServiceImpl() {
1325 XMLString::release(&m_Index);
1328 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1329 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1333 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1334 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1336 IMPL_CLONE_INTEGER_ATTRIB(Index);
1337 IMPL_CLONE_BOOLEAN_ATTRIB(isDefault);
1338 IMPL_CLONE_TYPED_CHILDREN(ServiceName);
1339 IMPL_CLONE_TYPED_CHILDREN(ServiceDescription);
1340 IMPL_CLONE_TYPED_CHILDREN(RequestedAttribute);
1343 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1344 IMPL_INTEGER_ATTRIB(Index);
1345 IMPL_BOOLEAN_ATTRIB(isDefault);
1346 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1347 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1348 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1351 void marshallAttributes(DOMElement* domElement) const {
1352 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1353 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1356 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1357 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1358 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1359 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1360 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1363 void processAttribute(const DOMAttr* attribute) {
1364 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1365 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1366 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1370 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1372 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1375 m_AuthnRequestsSigned=XML_BOOL_NULL;
1376 m_WantAssertionsSigned=XML_BOOL_NULL;
1377 m_children.push_back(nullptr);
1378 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1379 ++m_pos_AssertionConsumerService;
1383 virtual ~SPSSODescriptorImpl() {}
1385 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1386 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1390 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1394 void _clone(const SPSSODescriptorImpl& src) {
1395 SSODescriptorTypeImpl::_clone(src);
1396 IMPL_CLONE_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1397 IMPL_CLONE_BOOLEAN_ATTRIB(WantAssertionsSigned);
1398 IMPL_CLONE_TYPED_CHILDREN(AssertionConsumerService);
1399 IMPL_CLONE_TYPED_CHILDREN(AttributeConsumingService);
1402 IMPL_XMLOBJECT_CLONE_EX(SPSSODescriptor);
1403 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1404 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1405 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1406 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1408 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1409 if (!qualifiedName.hasNamespaceURI()) {
1410 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1411 setAuthnRequestsSigned(value);
1414 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1415 setWantAssertionsSigned(value);
1419 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1423 void marshallAttributes(DOMElement* domElement) const {
1424 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1425 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1426 RoleDescriptorImpl::marshallAttributes(domElement);
1429 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1430 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1431 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1432 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1436 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1438 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1439 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1442 m_children.push_back(nullptr);
1443 m_children.push_back(nullptr);
1444 m_pos_AuthnQueryService=m_pos_ContactPerson;
1445 ++m_pos_AuthnQueryService;
1446 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1447 ++m_pos_AssertionIDRequestService;
1451 virtual ~AuthnAuthorityDescriptorImpl() {}
1453 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1454 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1458 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1462 void _clone(const AuthnAuthorityDescriptorImpl& src) {
1463 RoleDescriptorImpl::_clone(src);
1464 IMPL_CLONE_TYPED_CHILDREN(AuthnQueryService);
1465 IMPL_CLONE_TYPED_CHILDREN(AssertionIDRequestService);
1466 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1469 IMPL_XMLOBJECT_CLONE_EX(AuthnAuthorityDescriptor);
1470 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1471 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1472 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1475 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1476 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1477 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1478 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1479 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1483 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1485 list<XMLObject*>::iterator m_pos_AuthzService;
1486 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1489 m_children.push_back(nullptr);
1490 m_children.push_back(nullptr);
1491 m_pos_AuthzService=m_pos_ContactPerson;
1492 ++m_pos_AuthzService;
1493 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1494 ++m_pos_AssertionIDRequestService;
1498 virtual ~PDPDescriptorImpl() {}
1500 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1501 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1505 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1509 void _clone(const PDPDescriptorImpl& src) {
1510 RoleDescriptorImpl::_clone(src);
1511 IMPL_CLONE_TYPED_CHILDREN(AuthzService);
1512 IMPL_CLONE_TYPED_CHILDREN(AssertionIDRequestService);
1513 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1516 IMPL_XMLOBJECT_CLONE_EX(PDPDescriptor);
1517 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1518 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1519 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1522 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1523 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1524 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1525 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1526 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1530 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1532 list<XMLObject*>::iterator m_pos_AttributeService;
1533 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1534 list<XMLObject*>::iterator m_pos_NameIDFormat;
1535 list<XMLObject*>::iterator m_pos_AttributeProfile;
1538 m_children.push_back(nullptr);
1539 m_children.push_back(nullptr);
1540 m_children.push_back(nullptr);
1541 m_children.push_back(nullptr);
1542 m_pos_AttributeService=m_pos_ContactPerson;
1543 ++m_pos_AttributeService;
1544 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1545 ++m_pos_AssertionIDRequestService;
1546 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1547 ++m_pos_NameIDFormat;
1548 m_pos_AttributeProfile=m_pos_NameIDFormat;
1549 ++m_pos_AttributeProfile;
1553 virtual ~AttributeAuthorityDescriptorImpl() {}
1555 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1556 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1560 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1564 void _clone(const AttributeAuthorityDescriptorImpl& src) {
1565 RoleDescriptorImpl::_clone(src);
1566 IMPL_CLONE_TYPED_CHILDREN(AttributeService);
1567 IMPL_CLONE_TYPED_CHILDREN(AssertionIDRequestService);
1568 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1569 IMPL_CLONE_TYPED_CHILDREN(AttributeProfile);
1570 IMPL_CLONE_TYPED_CHILDREN(Attribute);
1573 IMPL_XMLOBJECT_CLONE_EX(AttributeAuthorityDescriptor);
1574 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1575 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1576 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1577 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1578 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1581 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1582 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1583 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1584 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1585 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1586 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1587 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1591 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1594 m_WantAssertionsSigned=XML_BOOL_NULL;
1595 m_children.push_back(nullptr);
1596 m_pos_NameIDFormat=m_pos_ContactPerson;
1597 ++m_pos_NameIDFormat;
1601 list<XMLObject*>::iterator m_pos_NameIDFormat;
1603 QueryDescriptorTypeImpl() {
1608 virtual ~QueryDescriptorTypeImpl() {}
1610 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1611 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1615 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1619 void _clone(const QueryDescriptorTypeImpl& src) {
1620 RoleDescriptorImpl::_clone(src);
1621 IMPL_CLONE_BOOLEAN_ATTRIB(WantAssertionsSigned);
1622 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1625 QueryDescriptorType* cloneQueryDescriptorType() const {
1626 return dynamic_cast<QueryDescriptorType*>(clone());
1629 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1630 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1632 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1633 if (!qualifiedName.hasNamespaceURI()) {
1634 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1635 setWantAssertionsSigned(value);
1639 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1643 void marshallAttributes(DOMElement* domElement) const {
1644 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1645 RoleDescriptorImpl::marshallAttributes(domElement);
1648 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1649 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1650 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1654 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1657 virtual ~AuthnQueryDescriptorTypeImpl() {}
1659 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1660 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1662 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1664 IMPL_XMLOBJECT_CLONE_EX(AuthnQueryDescriptorType);
1667 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1670 virtual ~AttributeQueryDescriptorTypeImpl() {}
1672 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1673 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1675 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1678 void _clone(const AttributeQueryDescriptorTypeImpl& src) {
1679 QueryDescriptorTypeImpl::_clone(src);
1680 IMPL_CLONE_TYPED_CHILDREN(AttributeConsumingService);
1683 IMPL_XMLOBJECT_CLONE_EX(AttributeQueryDescriptorType);
1684 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1687 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1688 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1689 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1693 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1696 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1698 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1699 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1701 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1704 void _clone(const AuthzDecisionQueryDescriptorTypeImpl& src) {
1705 QueryDescriptorTypeImpl::_clone(src);
1706 IMPL_CLONE_TYPED_CHILDREN(ActionNamespace);
1709 IMPL_XMLOBJECT_CLONE_EX(AuthzDecisionQueryDescriptorType);
1710 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1713 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1714 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1715 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1719 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1720 public virtual SignableObject,
1721 public AbstractComplexElement,
1722 public AbstractAttributeExtensibleXMLObject,
1723 public AbstractDOMCachingXMLObject,
1724 public AbstractXMLObjectMarshaller,
1725 public AbstractXMLObjectUnmarshaller
1727 list<XMLObject*>::iterator m_pos_AffiliateMember;
1730 m_ID=m_AffiliationOwnerID=nullptr;
1731 m_ValidUntil=m_CacheDuration=nullptr;
1732 m_children.push_back(nullptr);
1733 m_children.push_back(nullptr);
1734 m_children.push_back(nullptr);
1735 m_Signature=nullptr;
1736 m_Extensions=nullptr;
1737 m_pos_Signature=m_children.begin();
1738 m_pos_Extensions=m_pos_Signature;
1740 m_pos_AffiliateMember=m_pos_Extensions;
1741 ++m_pos_AffiliateMember;
1745 virtual ~AffiliationDescriptorImpl() {
1746 XMLString::release(&m_ID);
1747 XMLString::release(&m_AffiliationOwnerID);
1748 delete m_ValidUntil;
1749 delete m_CacheDuration;
1752 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1753 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1757 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1758 : AbstractXMLObject(src), AbstractComplexElement(src),
1759 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1761 IMPL_CLONE_ATTRIB(ID);
1762 IMPL_CLONE_ATTRIB(AffiliationOwnerID);
1763 IMPL_CLONE_ATTRIB(ValidUntil);
1764 IMPL_CLONE_ATTRIB(CacheDuration);
1765 IMPL_CLONE_TYPED_CHILD(Signature);
1766 IMPL_CLONE_TYPED_CHILD(Extensions);
1767 IMPL_CLONE_TYPED_CHILDREN(KeyDescriptor);
1768 IMPL_CLONE_TYPED_CHILDREN(AffiliateMember);
1771 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1773 //IMPL_TYPED_CHILD(Signature);
1774 // Need customized setter.
1776 Signature* m_Signature;
1777 list<XMLObject*>::iterator m_pos_Signature;
1779 Signature* getSignature() const {
1783 void setSignature(Signature* sig) {
1784 prepareForAssignment(m_Signature,sig);
1785 *m_pos_Signature=m_Signature=sig;
1786 // Sync content reference back up.
1788 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1791 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1792 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1793 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1794 IMPL_DURATION_ATTRIB(CacheDuration,0);
1795 IMPL_TYPED_CHILD(Extensions);
1796 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1797 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1799 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1800 if (!qualifiedName.hasNamespaceURI()) {
1801 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1805 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1806 setAffiliationOwnerID(value);
1809 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1810 setValidUntil(value);
1813 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1814 setCacheDuration(value);
1818 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1822 void prepareForMarshalling() const {
1824 declareNonVisibleNamespaces();
1827 void marshallAttributes(DOMElement* domElement) const {
1828 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1829 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
1830 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1831 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1832 marshallExtensionAttributes(domElement);
1835 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1836 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1837 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1838 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
1839 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1840 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1843 void processAttribute(const DOMAttr* attribute) {
1844 PROC_ID_ATTRIB(ID,ID,nullptr);
1845 unmarshallExtensionAttribute(attribute);
1849 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
1850 public virtual SignableObject,
1851 public AbstractComplexElement,
1852 public AbstractAttributeExtensibleXMLObject,
1853 public AbstractDOMCachingXMLObject,
1854 public AbstractXMLObjectMarshaller,
1855 public AbstractXMLObjectUnmarshaller
1857 list<XMLObject*>::iterator m_pos_ContactPerson;
1860 m_ID=m_EntityID=nullptr;
1861 m_ValidUntil=m_CacheDuration=nullptr;
1862 m_children.push_back(nullptr);
1863 m_children.push_back(nullptr);
1864 m_children.push_back(nullptr);
1865 m_children.push_back(nullptr);
1866 m_children.push_back(nullptr);
1867 m_Signature=nullptr;
1868 m_Extensions=nullptr;
1869 m_AffiliationDescriptor=nullptr;
1870 m_Organization=nullptr;
1871 m_pos_Signature=m_children.begin();
1872 m_pos_Extensions=m_pos_Signature;
1874 m_pos_AffiliationDescriptor=m_pos_Extensions;
1875 ++m_pos_AffiliationDescriptor;
1876 m_pos_Organization=m_pos_AffiliationDescriptor;
1877 ++m_pos_Organization;
1878 m_pos_ContactPerson=m_pos_Organization;
1879 ++m_pos_ContactPerson;
1883 virtual ~EntityDescriptorImpl() {
1884 XMLString::release(&m_ID);
1885 XMLString::release(&m_EntityID);
1886 delete m_ValidUntil;
1887 delete m_CacheDuration;
1890 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1891 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1895 EntityDescriptorImpl(const EntityDescriptorImpl& src)
1896 : AbstractXMLObject(src), AbstractComplexElement(src),
1897 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1899 IMPL_CLONE_ATTRIB(ID);
1900 IMPL_CLONE_ATTRIB(EntityID);
1901 IMPL_CLONE_ATTRIB(ValidUntil);
1902 IMPL_CLONE_ATTRIB(CacheDuration);
1903 IMPL_CLONE_TYPED_CHILD(Signature);
1904 IMPL_CLONE_TYPED_CHILD(Extensions);
1905 IMPL_CLONE_TYPED_CHILD(AffiliationDescriptor);
1906 IMPL_CLONE_TYPED_CHILD(Organization);
1908 IMPL_CLONE_CHILDBAG_BEGIN;
1909 IMPL_CLONE_TYPED_CHILD_IN_BAG(IDPSSODescriptor);
1910 IMPL_CLONE_TYPED_CHILD_IN_BAG(SPSSODescriptor);
1911 IMPL_CLONE_TYPED_CHILD_IN_BAG(AuthnAuthorityDescriptor);
1912 IMPL_CLONE_TYPED_CHILD_IN_BAG(AttributeAuthorityDescriptor);
1913 IMPL_CLONE_TYPED_CHILD_IN_BAG(PDPDescriptor);
1914 IMPL_CLONE_TYPED_CHILD_IN_BAG(AuthnQueryDescriptorType);
1915 IMPL_CLONE_TYPED_CHILD_IN_BAG(AttributeQueryDescriptorType);
1916 IMPL_CLONE_TYPED_CHILD_IN_BAG(AuthzDecisionQueryDescriptorType);
1917 IMPL_CLONE_TYPED_CHILD_IN_BAG(RoleDescriptor);
1918 IMPL_CLONE_CHILDBAG_END;
1920 IMPL_CLONE_TYPED_CHILDREN(ContactPerson);
1921 IMPL_CLONE_TYPED_CHILDREN(AdditionalMetadataLocation);
1924 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
1926 //IMPL_TYPED_CHILD(Signature);
1927 // Need customized setter.
1929 Signature* m_Signature;
1930 list<XMLObject*>::iterator m_pos_Signature;
1932 Signature* getSignature() const {
1936 void setSignature(Signature* sig) {
1937 prepareForAssignment(m_Signature,sig);
1938 *m_pos_Signature=m_Signature=sig;
1939 // Sync content reference back up.
1941 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1944 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1945 IMPL_STRING_ATTRIB(EntityID);
1946 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1947 IMPL_DURATION_ATTRIB(CacheDuration,0);
1948 IMPL_TYPED_CHILD(Extensions);
1949 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
1950 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
1951 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
1952 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
1953 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
1954 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
1955 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
1956 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
1957 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
1958 IMPL_TYPED_CHILD(AffiliationDescriptor);
1959 IMPL_TYPED_CHILD(Organization);
1960 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1961 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
1963 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1964 if (!qualifiedName.hasNamespaceURI()) {
1965 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1969 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
1973 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1974 setValidUntil(value);
1977 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1978 setCacheDuration(value);
1982 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1985 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
1986 // Check for "known" elements/types.
1987 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
1988 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
1989 if (qname == SPSSODescriptor::ELEMENT_QNAME)
1990 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
1991 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
1992 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
1993 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
1994 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
1995 if (qname == PDPDescriptor::ELEMENT_QNAME)
1996 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
1997 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
1998 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
1999 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2000 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2001 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2002 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2004 vector<RoleDescriptor*>::const_iterator i =
2005 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2006 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2010 void prepareForMarshalling() const {
2012 declareNonVisibleNamespaces();
2015 void marshallAttributes(DOMElement* domElement) const {
2016 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2017 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2018 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2019 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2020 marshallExtensionAttributes(domElement);
2023 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2024 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2025 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2026 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2027 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2028 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2029 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2030 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2031 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2032 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2033 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2034 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2035 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2036 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2037 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2038 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2039 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2042 void processAttribute(const DOMAttr* attribute) {
2043 PROC_ID_ATTRIB(ID,ID,nullptr);
2044 unmarshallExtensionAttribute(attribute);
2048 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2049 public virtual SignableObject,
2050 public AbstractComplexElement,
2051 public AbstractDOMCachingXMLObject,
2052 public AbstractXMLObjectMarshaller,
2053 public AbstractXMLObjectUnmarshaller
2056 m_ID=m_Name=nullptr;
2057 m_ValidUntil=m_CacheDuration=nullptr;
2058 m_children.push_back(nullptr);
2059 m_children.push_back(nullptr);
2060 m_Signature=nullptr;
2061 m_Extensions=nullptr;
2062 m_pos_Signature=m_children.begin();
2063 m_pos_Extensions=m_pos_Signature;
2068 virtual ~EntitiesDescriptorImpl() {
2069 XMLString::release(&m_ID);
2070 XMLString::release(&m_Name);
2071 delete m_ValidUntil;
2072 delete m_CacheDuration;
2075 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2076 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2080 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2081 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2083 IMPL_CLONE_ATTRIB(ID);
2084 IMPL_CLONE_ATTRIB(Name);
2085 IMPL_CLONE_ATTRIB(ValidUntil);
2086 IMPL_CLONE_ATTRIB(CacheDuration);
2087 IMPL_CLONE_TYPED_CHILD(Signature);
2088 IMPL_CLONE_TYPED_CHILD(Extensions);
2090 IMPL_CLONE_CHILDBAG_BEGIN;
2091 IMPL_CLONE_TYPED_CHILD_IN_BAG(EntityDescriptor);
2092 IMPL_CLONE_TYPED_CHILD_IN_BAG(EntitiesDescriptor);
2093 IMPL_CLONE_CHILDBAG_END;
2096 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2098 //IMPL_TYPED_CHILD(Signature);
2099 // Need customized setter.
2101 Signature* m_Signature;
2102 list<XMLObject*>::iterator m_pos_Signature;
2104 Signature* getSignature() const {
2108 void setSignature(Signature* sig) {
2109 prepareForAssignment(m_Signature,sig);
2110 *m_pos_Signature=m_Signature=sig;
2111 // Sync content reference back up.
2113 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2116 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2117 IMPL_STRING_ATTRIB(Name);
2118 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2119 IMPL_DURATION_ATTRIB(CacheDuration,0);
2120 IMPL_TYPED_CHILD(Extensions);
2121 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2122 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2125 void prepareForMarshalling() const {
2127 declareNonVisibleNamespaces();
2130 void marshallAttributes(DOMElement* domElement) const {
2131 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2132 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2133 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2134 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2137 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2138 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2139 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2140 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2141 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2142 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2145 void processAttribute(const DOMAttr* attribute) {
2146 PROC_ID_ATTRIB(ID,ID,nullptr);
2147 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2148 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2149 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2153 class SAML_DLLLOCAL DiscoveryResponseImpl : public virtual DiscoveryResponse, public IndexedEndpointTypeImpl
2156 virtual ~DiscoveryResponseImpl() {}
2158 DiscoveryResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2159 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2161 DiscoveryResponseImpl(const DiscoveryResponseImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
2163 IMPL_XMLOBJECT_CLONE_EX(DiscoveryResponse);
2166 class SAML_DLLLOCAL RequestInitiatorImpl : public virtual RequestInitiator, public EndpointTypeImpl
2169 virtual ~RequestInitiatorImpl() {}
2171 RequestInitiatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2172 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2174 RequestInitiatorImpl(const RequestInitiatorImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
2176 IMPL_XMLOBJECT_CLONE_EX(RequestInitiator);
2179 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2180 public AbstractComplexElement,
2181 public AbstractDOMCachingXMLObject,
2182 public AbstractXMLObjectMarshaller,
2183 public AbstractXMLObjectUnmarshaller
2186 virtual ~EntityAttributesImpl() {}
2188 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2189 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2192 EntityAttributesImpl(const EntityAttributesImpl& src)
2193 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2194 IMPL_CLONE_CHILDBAG_BEGIN;
2195 IMPL_CLONE_TYPED_CHILD_IN_BAG(Attribute);
2196 IMPL_CLONE_TYPED_FOREIGN_CHILD_IN_BAG(Assertion,saml2);
2197 IMPL_CLONE_CHILDBAG_END;
2200 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2201 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2202 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2205 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2206 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2207 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2208 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2212 class SAML_DLLLOCAL DigestMethodImpl : public virtual DigestMethod,
2213 public AbstractComplexElement,
2214 public AbstractDOMCachingXMLObject,
2215 public AbstractXMLObjectMarshaller,
2216 public AbstractXMLObjectUnmarshaller
2219 virtual ~DigestMethodImpl() {
2220 XMLString::release(&m_Algorithm);
2223 DigestMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2224 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Algorithm(nullptr) {
2227 DigestMethodImpl(const DigestMethodImpl& src)
2228 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_Algorithm(nullptr) {
2229 IMPL_CLONE_ATTRIB(Algorithm);
2230 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
2233 IMPL_XMLOBJECT_CLONE(DigestMethod);
2234 IMPL_STRING_ATTRIB(Algorithm);
2235 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2238 void marshallAttributes(DOMElement* domElement) const {
2239 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2242 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2244 getUnknownXMLObjects().push_back(childXMLObject);
2247 void processAttribute(const DOMAttr* attribute) {
2248 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2252 class SAML_DLLLOCAL SigningMethodImpl : public virtual SigningMethod,
2253 public AbstractComplexElement,
2254 public AbstractDOMCachingXMLObject,
2255 public AbstractXMLObjectMarshaller,
2256 public AbstractXMLObjectUnmarshaller
2259 m_Algorithm = m_MinKeySize = m_MaxKeySize = nullptr;
2263 virtual ~SigningMethodImpl() {
2264 XMLString::release(&m_Algorithm);
2265 XMLString::release(&m_MinKeySize);
2266 XMLString::release(&m_MaxKeySize);
2269 SigningMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2270 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2274 SigningMethodImpl(const SigningMethodImpl& src)
2275 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2277 IMPL_CLONE_ATTRIB(Algorithm);
2278 IMPL_CLONE_INTEGER_ATTRIB(MinKeySize);
2279 IMPL_CLONE_INTEGER_ATTRIB(MaxKeySize);
2280 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
2283 IMPL_XMLOBJECT_CLONE(SigningMethod);
2284 IMPL_STRING_ATTRIB(Algorithm);
2285 IMPL_INTEGER_ATTRIB(MinKeySize);
2286 IMPL_INTEGER_ATTRIB(MaxKeySize);
2287 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2290 void marshallAttributes(DOMElement* domElement) const {
2291 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2292 MARSHALL_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2293 MARSHALL_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2296 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2298 getUnknownXMLObjects().push_back(childXMLObject);
2301 void processAttribute(const DOMAttr* attribute) {
2302 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2303 PROC_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2304 PROC_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2308 class SAML_DLLLOCAL DisplayNameImpl : public virtual DisplayName, public localizedNameTypeImpl
2311 virtual ~DisplayNameImpl() {}
2313 DisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2314 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2316 DisplayNameImpl(const DisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2318 IMPL_XMLOBJECT_CLONE_EX(DisplayName);
2321 class SAML_DLLLOCAL DescriptionImpl : public virtual Description, public localizedNameTypeImpl
2324 virtual ~DescriptionImpl() {}
2326 DescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2327 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2329 DescriptionImpl(const DescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2331 IMPL_XMLOBJECT_CLONE_EX(Description);
2334 class SAML_DLLLOCAL InformationURLImpl : public virtual InformationURL, public localizedURITypeImpl
2337 virtual ~InformationURLImpl() {}
2339 InformationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2340 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2342 InformationURLImpl(const InformationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2344 IMPL_XMLOBJECT_CLONE_EX(InformationURL);
2347 class SAML_DLLLOCAL PrivacyStatementURLImpl : public virtual PrivacyStatementURL, public localizedURITypeImpl
2350 virtual ~PrivacyStatementURLImpl() {}
2352 PrivacyStatementURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2353 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2355 PrivacyStatementURLImpl(const PrivacyStatementURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2357 IMPL_XMLOBJECT_CLONE_EX(PrivacyStatementURL);
2360 class SAML_DLLLOCAL KeywordsImpl : public virtual Keywords,
2361 public AbstractSimpleElement,
2362 public AbstractDOMCachingXMLObject,
2363 public AbstractXMLObjectMarshaller,
2364 public AbstractXMLObjectUnmarshaller
2368 m_LangPrefix=nullptr;
2377 virtual ~KeywordsImpl() {
2378 XMLString::release(&m_Lang);
2379 XMLString::release(&m_LangPrefix);
2382 KeywordsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2383 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2387 KeywordsImpl(const KeywordsImpl& src)
2388 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2390 IMPL_CLONE_FOREIGN_ATTRIB(Lang);
2393 IMPL_XMLOBJECT_CLONE(Keywords);
2394 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2397 void marshallAttributes(DOMElement* domElement) const {
2398 if (m_Lang && *m_Lang) {
2399 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2400 if (m_LangPrefix && *m_LangPrefix)
2401 attr->setPrefix(m_LangPrefix);
2403 attr->setPrefix(xmlconstants::XML_PREFIX);
2404 attr->setNodeValue(m_Lang);
2405 domElement->setAttributeNodeNS(attr);
2409 void processAttribute(const DOMAttr* attribute) {
2410 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2411 setLang(attribute->getValue());
2412 const XMLCh* temp = attribute->getPrefix();
2413 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2414 m_LangPrefix = XMLString::replicate(temp);
2417 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2421 class SAML_DLLLOCAL LogoImpl : public virtual Logo,
2422 public AbstractSimpleElement,
2423 public AbstractDOMCachingXMLObject,
2424 public AbstractXMLObjectMarshaller,
2425 public AbstractXMLObjectUnmarshaller
2429 m_LangPrefix=nullptr;
2440 virtual ~LogoImpl() {
2441 XMLString::release(&m_Lang);
2442 XMLString::release(&m_LangPrefix);
2443 XMLString::release(&m_Height);
2444 XMLString::release(&m_Width);
2447 LogoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2448 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2452 LogoImpl(const LogoImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2454 IMPL_CLONE_FOREIGN_ATTRIB(Lang);
2455 IMPL_CLONE_INTEGER_ATTRIB(Height);
2456 IMPL_CLONE_INTEGER_ATTRIB(Width);
2459 IMPL_XMLOBJECT_CLONE(Logo);
2460 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2461 IMPL_INTEGER_ATTRIB(Height);
2462 IMPL_INTEGER_ATTRIB(Width);
2465 void marshallAttributes(DOMElement* domElement) const {
2466 if (m_Lang && *m_Lang) {
2467 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2468 if (m_LangPrefix && *m_LangPrefix)
2469 attr->setPrefix(m_LangPrefix);
2471 attr->setPrefix(xmlconstants::XML_PREFIX);
2472 attr->setNodeValue(m_Lang);
2473 domElement->setAttributeNodeNS(attr);
2475 MARSHALL_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2476 MARSHALL_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2479 void processAttribute(const DOMAttr* attribute) {
2480 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2481 setLang(attribute->getValue());
2482 const XMLCh* temp = attribute->getPrefix();
2483 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2484 m_LangPrefix = XMLString::replicate(temp);
2487 PROC_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2488 PROC_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2489 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2493 class SAML_DLLLOCAL UIInfoImpl : public virtual UIInfo,
2494 public AbstractComplexElement,
2495 public AbstractDOMCachingXMLObject,
2496 public AbstractXMLObjectMarshaller,
2497 public AbstractXMLObjectUnmarshaller
2500 virtual ~UIInfoImpl() {}
2502 UIInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2503 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2506 UIInfoImpl(const UIInfoImpl& src)
2507 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2508 IMPL_CLONE_CHILDBAG_BEGIN;
2509 IMPL_CLONE_TYPED_CHILD_IN_BAG(DisplayName);
2510 IMPL_CLONE_TYPED_CHILD_IN_BAG(Description);
2511 IMPL_CLONE_TYPED_CHILD_IN_BAG(Keywords);
2512 IMPL_CLONE_TYPED_CHILD_IN_BAG(Logo);
2513 IMPL_CLONE_TYPED_CHILD_IN_BAG(InformationURL);
2514 IMPL_CLONE_TYPED_CHILD_IN_BAG(PrivacyStatementURL);
2515 IMPL_CLONE_XMLOBJECT_CHILD_IN_BAG(UnknownXMLObject);
2516 IMPL_CLONE_CHILDBAG_END;
2519 IMPL_XMLOBJECT_CLONE(UIInfo);
2520 IMPL_TYPED_CHILDREN(DisplayName,m_children.end());
2521 IMPL_TYPED_CHILDREN(Description,m_children.end());
2522 IMPL_TYPED_CHILDREN(Keywords,m_children.end());
2523 IMPL_TYPED_CHILDREN(Logo,m_children.end());
2524 IMPL_TYPED_CHILDREN(InformationURL,m_children.end());
2525 IMPL_TYPED_CHILDREN(PrivacyStatementURL,m_children.end());
2526 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2529 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2530 PROC_TYPED_CHILDREN(DisplayName,SAML20MD_UI_NS,false);
2531 PROC_TYPED_CHILDREN(Description,SAML20MD_UI_NS,false);
2532 PROC_TYPED_CHILDREN(Keywords,SAML20MD_UI_NS,false);
2533 PROC_TYPED_CHILDREN(Logo,SAML20MD_UI_NS,false);
2534 PROC_TYPED_CHILDREN(InformationURL,SAML20MD_UI_NS,false);
2535 PROC_TYPED_CHILDREN(PrivacyStatementURL,SAML20MD_UI_NS,false);
2538 const XMLCh* nsURI=root->getNamespaceURI();
2539 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2540 getUnknownXMLObjects().push_back(childXMLObject);
2544 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2548 class SAML_DLLLOCAL DiscoHintsImpl : public virtual DiscoHints,
2549 public AbstractComplexElement,
2550 public AbstractDOMCachingXMLObject,
2551 public AbstractXMLObjectMarshaller,
2552 public AbstractXMLObjectUnmarshaller
2555 virtual ~DiscoHintsImpl() {}
2557 DiscoHintsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2558 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2561 DiscoHintsImpl(const DiscoHintsImpl& src)
2562 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2563 IMPL_CLONE_CHILDBAG_BEGIN;
2564 IMPL_CLONE_TYPED_CHILD_IN_BAG(IPHint);
2565 IMPL_CLONE_TYPED_CHILD_IN_BAG(DomainHint);
2566 IMPL_CLONE_TYPED_CHILD_IN_BAG(GeolocationHint);
2567 IMPL_CLONE_XMLOBJECT_CHILD_IN_BAG(UnknownXMLObject);
2568 IMPL_CLONE_CHILDBAG_END;
2571 IMPL_XMLOBJECT_CLONE(DiscoHints);
2572 IMPL_TYPED_CHILDREN(IPHint,m_children.end());
2573 IMPL_TYPED_CHILDREN(DomainHint,m_children.end());
2574 IMPL_TYPED_CHILDREN(GeolocationHint,m_children.end());
2575 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2578 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2579 PROC_TYPED_CHILDREN(IPHint,SAML20MD_UI_NS,false);
2580 PROC_TYPED_CHILDREN(DomainHint,SAML20MD_UI_NS,false);
2581 PROC_TYPED_CHILDREN(GeolocationHint,SAML20MD_UI_NS,false);
2584 const XMLCh* nsURI=root->getNamespaceURI();
2585 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2586 getUnknownXMLObjects().push_back(childXMLObject);
2590 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2597 #if defined (_MSC_VER)
2598 #pragma warning( pop )
2601 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2602 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2603 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2604 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2605 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2606 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2607 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2608 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2610 // Builder Implementations
2612 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2613 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2614 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2615 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2616 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2617 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2618 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2619 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2620 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2621 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2622 IMPL_XMLOBJECTBUILDER(AttributeService);
2623 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2624 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2625 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2626 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2627 IMPL_XMLOBJECTBUILDER(AuthzService);
2628 IMPL_XMLOBJECTBUILDER(Company);
2629 IMPL_XMLOBJECTBUILDER(ContactPerson);
2630 IMPL_XMLOBJECTBUILDER(EmailAddress);
2631 IMPL_XMLOBJECTBUILDER(EndpointType);
2632 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2633 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2634 IMPL_XMLOBJECTBUILDER(Extensions);
2635 IMPL_XMLOBJECTBUILDER(GivenName);
2636 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2637 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2638 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2639 IMPL_XMLOBJECTBUILDER(localizedNameType);
2640 IMPL_XMLOBJECTBUILDER(localizedURIType);
2641 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2642 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2643 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2644 IMPL_XMLOBJECTBUILDER(Organization);
2645 IMPL_XMLOBJECTBUILDER(OrganizationName);
2646 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2647 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2648 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2649 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2650 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2651 IMPL_XMLOBJECTBUILDER(ServiceName);
2652 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2653 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2654 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2655 IMPL_XMLOBJECTBUILDER(SurName);
2656 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2658 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2659 IMPL_XMLOBJECTBUILDER(SourceID);
2660 IMPL_XMLOBJECTBUILDER(DiscoveryResponse);
2661 IMPL_XMLOBJECTBUILDER(RequestInitiator);
2662 IMPL_XMLOBJECTBUILDER(EntityAttributes);
2663 IMPL_XMLOBJECTBUILDER(DigestMethod);
2664 IMPL_XMLOBJECTBUILDER(SigningMethod);
2665 IMPL_XMLOBJECTBUILDER(DisplayName);
2666 IMPL_XMLOBJECTBUILDER(Description);
2667 IMPL_XMLOBJECTBUILDER(Keywords);
2668 IMPL_XMLOBJECTBUILDER(Logo);
2669 IMPL_XMLOBJECTBUILDER(InformationURL);
2670 IMPL_XMLOBJECTBUILDER(PrivacyStatementURL);
2671 IMPL_XMLOBJECTBUILDER(UIInfo);
2672 IMPL_XMLOBJECTBUILDER(IPHint);
2673 IMPL_XMLOBJECTBUILDER(DomainHint);
2674 IMPL_XMLOBJECTBUILDER(GeolocationHint);
2675 IMPL_XMLOBJECTBUILDER(DiscoHints);
2677 #ifdef HAVE_COVARIANT_RETURNS
2678 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2680 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2682 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
2685 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2688 const DigestMethod* RoleDescriptor::getDigestMethod() const
2690 bool roleLevel = false;
2691 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
2693 if (getExtensions()) {
2694 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
2695 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2696 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
2698 if (dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
2706 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
2707 if (entity && entity->getExtensions()) {
2708 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
2709 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2710 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
2711 if (dm && dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
2720 pair<const SigningMethod*,const Credential*> RoleDescriptor::getSigningMethod(const CredentialResolver& resolver, CredentialCriteria& cc) const
2722 bool roleLevel = false;
2723 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
2725 if (getExtensions()) {
2726 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
2727 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2728 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
2731 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
2732 cc.setXMLAlgorithm(sm->getAlgorithm());
2733 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
2734 if (minsize.first || maxsize.first) {
2735 cc.setKeySize(minsize.first ? minsize.second : 0);
2736 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
2740 cc.setMaxKeySize(0);
2742 const Credential* cred = resolver.resolve(&cc);
2744 return make_pair(sm, cred);
2751 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
2752 if (entity && entity->getExtensions()) {
2753 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
2754 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2755 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
2757 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
2758 cc.setXMLAlgorithm(sm->getAlgorithm());
2759 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
2760 if (minsize.first || maxsize.first) {
2761 cc.setKeySize(minsize.first ? minsize.second : 0);
2762 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
2766 cc.setMaxKeySize(0);
2768 const Credential* cred = resolver.resolve(&cc);
2770 return make_pair(sm, cred);
2778 cc.setMaxKeySize(0);
2779 cc.setXMLAlgorithm(nullptr);
2780 return pair<const SigningMethod*,const Credential*>(nullptr, resolver.resolve(&cc));
2783 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2784 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);
2785 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);
2786 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2787 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2788 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);
2789 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);
2790 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2791 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);
2792 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);
2793 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);
2794 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);
2795 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);
2796 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);
2797 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);
2798 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);
2799 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2800 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2801 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2802 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2803 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);
2804 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2805 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);
2806 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);
2807 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2808 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);
2809 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);
2810 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2811 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);
2812 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2813 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2814 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2815 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2816 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2817 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2818 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2819 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2820 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2821 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2822 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2823 const XMLCh Description::LOCAL_NAME[] = UNICODE_LITERAL_11(D,e,s,c,r,i,p,t,i,o,n);
2824 const XMLCh DigestMethod::LOCAL_NAME[] = UNICODE_LITERAL_12(D,i,g,e,s,t,M,e,t,h,o,d);
2825 const XMLCh DigestMethod::TYPE_NAME[] = UNICODE_LITERAL_16(D,i,g,e,s,t,M,e,t,h,o,d,T,y,p,e);
2826 const XMLCh DigestMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
2827 const XMLCh DiscoHints::LOCAL_NAME[] = UNICODE_LITERAL_10(D,i,s,c,o,H,i,n,t,s);
2828 const XMLCh DiscoHints::TYPE_NAME[] = UNICODE_LITERAL_14(D,i,s,c,o,H,i,n,t,s,T,y,p,e);
2829 const XMLCh DiscoveryResponse::LOCAL_NAME[] = UNICODE_LITERAL_17(D,i,s,c,o,v,e,r,y,R,e,s,p,o,n,s,e);
2830 const XMLCh DisplayName::LOCAL_NAME[] = UNICODE_LITERAL_11(D,i,s,p,l,a,y,N,a,m,e);
2831 const XMLCh DomainHint::LOCAL_NAME[] = UNICODE_LITERAL_10(D,o,m,a,i,n,H,i,n,t);
2832 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2833 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2834 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2835 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2836 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2837 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);
2838 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);
2839 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);
2840 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2841 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2842 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2843 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);
2844 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2845 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2846 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
2847 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);
2848 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2849 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2850 const XMLCh GeolocationHint::LOCAL_NAME[] = UNICODE_LITERAL_15(G,e,o,l,o,c,a,t,i,o,n,H,i,n,t);
2851 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2852 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2853 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);
2854 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);
2855 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2856 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);
2857 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2858 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2859 const XMLCh InformationURL::LOCAL_NAME[] = UNICODE_LITERAL_14(I,n,f,o,r,m,a,t,i,o,n,U,R,L);
2860 const XMLCh IPHint::LOCAL_NAME[] = UNICODE_LITERAL_6(I,P,H,i,n,t);
2861 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2862 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);
2863 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2864 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2865 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2866 const XMLCh Keywords::LOCAL_NAME[] = UNICODE_LITERAL_8(K,e,y,w,o,r,d,s);
2867 const XMLCh Keywords::TYPE_NAME[] = UNICODE_LITERAL_12(K,e,y,w,o,r,d,s,T,y,p,e);
2868 const XMLCh Keywords::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2869 const XMLCh Logo::LOCAL_NAME[] = UNICODE_LITERAL_4(L,o,g,o);
2870 const XMLCh Logo::TYPE_NAME[] = UNICODE_LITERAL_8(L,o,g,o,T,y,p,e);
2871 const XMLCh Logo::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2872 const XMLCh Logo::HEIGHT_ATTRIB_NAME[] = UNICODE_LITERAL_6(h,e,i,g,h,t);
2873 const XMLCh Logo::WIDTH_ATTRIB_NAME[] = UNICODE_LITERAL_5(w,i,d,t,h);
2874 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2875 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);
2876 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2877 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2878 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2879 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2880 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);
2881 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2882 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);
2883 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2884 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2885 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2886 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);
2887 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2888 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2889 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);
2890 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);
2891 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2892 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);
2893 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);
2894 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);
2895 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);
2896 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2897 const XMLCh RequestInitiator::LOCAL_NAME[] = UNICODE_LITERAL_16(R,e,q,u,e,s,t,I,n,i,t,i,a,t,o,r);
2898 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2899 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2900 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);
2901 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2902 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);
2903 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2904 const XMLCh SigningMethod::LOCAL_NAME[] = UNICODE_LITERAL_13(S,i,g,n,i,n,g,M,e,t,h,o,d);
2905 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);
2906 const XMLCh SigningMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
2907 const XMLCh SigningMethod::MINKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,i,n,K,e,y,S,i,z,e);
2908 const XMLCh SigningMethod::MAXKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,a,x,K,e,y,S,i,z,e);
2909 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);
2910 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);
2911 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2912 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2913 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);
2914 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);
2915 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);
2916 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2917 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);
2918 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2919 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2920 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
2921 const XMLCh UIInfo::LOCAL_NAME[] = UNICODE_LITERAL_6(U,I,I,n,f,o);
2922 const XMLCh UIInfo::TYPE_NAME[] = UNICODE_LITERAL_10(U,I,I,n,f,o,T,y,p,e);