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 xmltooling;
57 using xmlconstants::XMLSIG_NS;
58 using xmlconstants::XML_BOOL_NULL;
60 #if defined (_MSC_VER)
61 #pragma warning( push )
62 #pragma warning( disable : 4250 4251 )
68 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
69 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
70 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
71 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
72 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
73 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
74 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
75 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
77 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
78 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
79 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,IPHint);
80 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,DomainHint);
81 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GeolocationHint);
83 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
84 public AbstractSimpleElement,
85 public AbstractDOMCachingXMLObject,
86 public AbstractXMLObjectMarshaller,
87 public AbstractXMLObjectUnmarshaller
95 localizedNameTypeImpl() {
100 virtual ~localizedNameTypeImpl() {
101 XMLString::release(&m_Lang);
102 XMLString::release(&m_LangPrefix);
105 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
106 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
110 localizedNameTypeImpl(const localizedNameTypeImpl& src)
111 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
115 void _clone(const localizedNameTypeImpl& src) {
116 IMPL_CLONE_FOREIGN_ATTRIB(Lang);
119 IMPL_XMLOBJECT_CLONE_EX(localizedNameType);
120 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
123 void marshallAttributes(DOMElement* domElement) const {
124 if (m_Lang && *m_Lang) {
125 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
126 if (m_LangPrefix && *m_LangPrefix)
127 attr->setPrefix(m_LangPrefix);
129 attr->setPrefix(xmlconstants::XML_PREFIX);
130 attr->setNodeValue(m_Lang);
131 domElement->setAttributeNodeNS(attr);
135 void processAttribute(const DOMAttr* attribute) {
136 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
137 setLang(attribute->getValue());
138 const XMLCh* temp = attribute->getPrefix();
139 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
140 m_LangPrefix = XMLString::replicate(temp);
143 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
147 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
148 public AbstractSimpleElement,
149 public AbstractDOMCachingXMLObject,
150 public AbstractXMLObjectMarshaller,
151 public AbstractXMLObjectUnmarshaller
155 m_LangPrefix=nullptr;
159 localizedURITypeImpl() {
164 virtual ~localizedURITypeImpl() {
165 XMLString::release(&m_Lang);
166 XMLString::release(&m_LangPrefix);
169 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
170 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
174 localizedURITypeImpl(const localizedURITypeImpl& src)
175 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
179 void _clone(const localizedURITypeImpl& src) {
180 IMPL_CLONE_FOREIGN_ATTRIB(Lang);
183 IMPL_XMLOBJECT_CLONE_EX(localizedURIType);
184 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
187 void marshallAttributes(DOMElement* domElement) const {
188 if (m_Lang && *m_Lang) {
189 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
190 if (m_LangPrefix && *m_LangPrefix)
191 attr->setPrefix(m_LangPrefix);
193 attr->setPrefix(xmlconstants::XML_PREFIX);
194 attr->setNodeValue(m_Lang);
195 domElement->setAttributeNodeNS(attr);
199 void processAttribute(const DOMAttr* attribute) {
200 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
201 setLang(attribute->getValue());
202 const XMLCh* temp = attribute->getPrefix();
203 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
204 m_LangPrefix = XMLString::replicate(temp);
207 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
211 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
214 virtual ~OrganizationNameImpl() {}
216 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
217 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
219 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
221 IMPL_XMLOBJECT_CLONE_EX(OrganizationName);
224 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
227 virtual ~OrganizationDisplayNameImpl() {}
229 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
230 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
232 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
234 IMPL_XMLOBJECT_CLONE_EX(OrganizationDisplayName);
237 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
240 virtual ~OrganizationURLImpl() {}
242 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
243 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
245 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
247 IMPL_XMLOBJECT_CLONE_EX(OrganizationURL);
250 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
253 virtual ~ServiceNameImpl() {}
255 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
256 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
258 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
260 IMPL_XMLOBJECT_CLONE_EX(ServiceName);
263 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
266 virtual ~ServiceDescriptionImpl() {}
268 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
269 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
271 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
273 IMPL_XMLOBJECT_CLONE_EX(ServiceDescription);
276 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
277 public AbstractComplexElement,
278 public AbstractDOMCachingXMLObject,
279 public AbstractXMLObjectMarshaller,
280 public AbstractXMLObjectUnmarshaller
283 virtual ~ExtensionsImpl() {}
285 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
286 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
289 ExtensionsImpl(const ExtensionsImpl& src)
290 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
291 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
294 IMPL_XMLOBJECT_CLONE(Extensions);
295 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
298 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
300 const XMLCh* nsURI=root->getNamespaceURI();
301 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
302 getUnknownXMLObjects().push_back(childXMLObject);
306 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
310 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
311 public AbstractComplexElement,
312 public AbstractAttributeExtensibleXMLObject,
313 public AbstractDOMCachingXMLObject,
314 public AbstractXMLObjectMarshaller,
315 public AbstractXMLObjectUnmarshaller
317 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
318 list<XMLObject*>::iterator m_pos_OrganizationURL;
321 m_children.push_back(nullptr);
322 m_children.push_back(nullptr);
323 m_children.push_back(nullptr);
324 m_Extensions=nullptr;
325 m_pos_Extensions=m_children.begin();
326 m_pos_OrganizationDisplayName=m_pos_Extensions;
327 ++m_pos_OrganizationDisplayName;
328 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
329 ++m_pos_OrganizationURL;
333 virtual ~OrganizationImpl() {}
335 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
336 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
340 OrganizationImpl(const OrganizationImpl& src)
341 : AbstractXMLObject(src), AbstractComplexElement(src),
342 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
344 IMPL_CLONE_TYPED_CHILD(Extensions);
345 IMPL_CLONE_TYPED_CHILDREN(OrganizationName);
346 IMPL_CLONE_TYPED_CHILDREN(OrganizationDisplayName);
347 IMPL_CLONE_TYPED_CHILDREN(OrganizationURL);
350 IMPL_XMLOBJECT_CLONE(Organization);
351 IMPL_TYPED_CHILD(Extensions);
352 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
353 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
354 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
357 void marshallAttributes(DOMElement* domElement) const {
358 marshallExtensionAttributes(domElement);
361 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
362 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
363 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
364 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
365 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
366 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
369 void processAttribute(const DOMAttr* attribute) {
370 unmarshallExtensionAttribute(attribute);
374 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
375 public AbstractComplexElement,
376 public AbstractAttributeExtensibleXMLObject,
377 public AbstractDOMCachingXMLObject,
378 public AbstractXMLObjectMarshaller,
379 public AbstractXMLObjectUnmarshaller
381 list<XMLObject*>::iterator m_pos_TelephoneNumber;
384 m_ContactType=nullptr;
385 m_children.push_back(nullptr);
386 m_children.push_back(nullptr);
387 m_children.push_back(nullptr);
388 m_children.push_back(nullptr);
389 m_children.push_back(nullptr);
390 m_Extensions=nullptr;
394 m_pos_Extensions=m_children.begin();
395 m_pos_Company=m_pos_Extensions;
397 m_pos_GivenName=m_pos_Company;
399 m_pos_SurName=m_pos_GivenName;
401 m_pos_TelephoneNumber=m_pos_SurName;
402 ++m_pos_TelephoneNumber;
406 virtual ~ContactPersonImpl() {
407 XMLString::release(&m_ContactType);
410 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
411 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
415 ContactPersonImpl(const ContactPersonImpl& src)
416 : AbstractXMLObject(src), AbstractComplexElement(src),
417 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
419 IMPL_CLONE_ATTRIB(ContactType);
420 IMPL_CLONE_TYPED_CHILD(Extensions);
421 IMPL_CLONE_TYPED_CHILD(Company);
422 IMPL_CLONE_TYPED_CHILD(GivenName);
423 IMPL_CLONE_TYPED_CHILD(SurName);
424 IMPL_CLONE_TYPED_CHILDREN(EmailAddress);
425 IMPL_CLONE_TYPED_CHILDREN(TelephoneNumber);
428 IMPL_XMLOBJECT_CLONE(ContactPerson);
429 IMPL_STRING_ATTRIB(ContactType);
430 IMPL_TYPED_CHILD(Extensions);
431 IMPL_TYPED_CHILD(Company);
432 IMPL_TYPED_CHILD(GivenName);
433 IMPL_TYPED_CHILD(SurName);
434 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
435 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
437 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
438 if (!qualifiedName.hasNamespaceURI()) {
439 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
440 setContactType(value);
444 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
448 void marshallAttributes(DOMElement* domElement) const {
449 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
450 marshallExtensionAttributes(domElement);
453 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
454 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
455 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
456 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
457 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
458 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
459 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
460 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
463 void processAttribute(const DOMAttr* attribute) {
464 unmarshallExtensionAttribute(attribute);
468 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
469 public AbstractSimpleElement,
470 public AbstractDOMCachingXMLObject,
471 public AbstractXMLObjectMarshaller,
472 public AbstractXMLObjectUnmarshaller
479 virtual ~AdditionalMetadataLocationImpl() {
480 XMLString::release(&m_Namespace);
483 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
484 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
488 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
489 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
491 IMPL_CLONE_ATTRIB(Namespace);
494 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
495 IMPL_STRING_ATTRIB(Namespace);
498 void marshallAttributes(DOMElement* domElement) const {
499 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
502 void processAttribute(const DOMAttr* attribute) {
503 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
504 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
508 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
509 public AbstractComplexElement,
510 public AbstractDOMCachingXMLObject,
511 public AbstractXMLObjectMarshaller,
512 public AbstractXMLObjectUnmarshaller
517 m_children.push_back(nullptr);
518 m_pos_KeyInfo=m_children.begin();
522 virtual ~KeyDescriptorImpl() {
523 XMLString::release(&m_Use);
526 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
527 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
531 KeyDescriptorImpl(const KeyDescriptorImpl& src)
532 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
534 IMPL_CLONE_ATTRIB(Use);
535 IMPL_CLONE_TYPED_CHILD(KeyInfo);
536 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption);
539 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
540 IMPL_STRING_ATTRIB(Use);
541 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
542 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
545 void marshallAttributes(DOMElement* domElement) const {
546 MARSHALL_STRING_ATTRIB(Use,USE,nullptr);
549 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
550 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
551 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
552 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
555 void processAttribute(const DOMAttr* attribute) {
556 PROC_STRING_ATTRIB(Use,USE,nullptr);
557 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
561 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
562 public AbstractAttributeExtensibleXMLObject,
563 public AbstractComplexElement,
564 public AbstractDOMCachingXMLObject,
565 public AbstractXMLObjectMarshaller,
566 public AbstractXMLObjectUnmarshaller
569 m_Binding=m_Location=m_ResponseLocation=nullptr;
578 virtual ~EndpointTypeImpl() {
579 XMLString::release(&m_Binding);
580 XMLString::release(&m_Location);
581 XMLString::release(&m_ResponseLocation);
584 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
585 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
589 EndpointTypeImpl(const EndpointTypeImpl& src)
590 : AbstractXMLObject(src),
591 AbstractAttributeExtensibleXMLObject(src),
592 AbstractComplexElement(src),
593 AbstractDOMCachingXMLObject(src) {
597 void _clone(const EndpointTypeImpl& src) {
598 IMPL_CLONE_ATTRIB(Binding);
599 IMPL_CLONE_ATTRIB(Location);
600 IMPL_CLONE_ATTRIB(ResponseLocation);
601 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
604 IMPL_XMLOBJECT_CLONE_EX(EndpointType);
605 IMPL_STRING_ATTRIB(Binding);
606 IMPL_STRING_ATTRIB(Location);
607 IMPL_STRING_ATTRIB(ResponseLocation);
608 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
610 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
611 if (!qualifiedName.hasNamespaceURI()) {
612 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
616 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
620 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
621 setResponseLocation(value);
625 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
628 void marshallAttributes(DOMElement* domElement) const {
629 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
630 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
631 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
632 marshallExtensionAttributes(domElement);
635 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
637 const XMLCh* nsURI=root->getNamespaceURI();
638 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
639 getUnknownXMLObjects().push_back(childXMLObject);
642 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
645 void processAttribute(const DOMAttr* attribute) {
646 unmarshallExtensionAttribute(attribute);
650 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
654 m_isDefault=XML_BOOL_NULL;
658 IndexedEndpointTypeImpl() {
662 virtual ~IndexedEndpointTypeImpl() {
663 XMLString::release(&m_Index);
666 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
667 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
671 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
675 void _clone(const IndexedEndpointTypeImpl& src) {
676 EndpointTypeImpl::_clone(src);
677 IMPL_CLONE_INTEGER_ATTRIB(Index);
678 IMPL_CLONE_BOOLEAN_ATTRIB(isDefault);
681 IMPL_XMLOBJECT_CLONE_EX(IndexedEndpointType);
682 IMPL_INTEGER_ATTRIB(Index);
683 IMPL_BOOLEAN_ATTRIB(isDefault);
685 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
686 if (!qualifiedName.hasNamespaceURI()) {
687 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
691 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
696 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
700 void marshallAttributes(DOMElement* domElement) const {
701 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
702 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
703 EndpointTypeImpl::marshallAttributes(domElement);
707 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
710 virtual ~ArtifactResolutionServiceImpl() {}
712 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
713 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
715 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
717 IMPL_XMLOBJECT_CLONE_EX(ArtifactResolutionService);
720 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
723 virtual ~SingleLogoutServiceImpl() {}
725 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
726 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
728 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
730 IMPL_XMLOBJECT_CLONE_EX(SingleLogoutService);
733 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
736 virtual ~ManageNameIDServiceImpl() {}
738 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
739 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
741 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
743 IMPL_XMLOBJECT_CLONE_EX(ManageNameIDService);
746 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
749 virtual ~SingleSignOnServiceImpl() {}
751 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
752 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
754 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
756 IMPL_XMLOBJECT_CLONE_EX(SingleSignOnService);
759 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
762 virtual ~NameIDMappingServiceImpl() {}
764 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
765 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
767 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
769 IMPL_XMLOBJECT_CLONE_EX(NameIDMappingService);
772 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
775 virtual ~AssertionIDRequestServiceImpl() {}
777 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
778 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
780 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
782 IMPL_XMLOBJECT_CLONE_EX(AssertionIDRequestService);
785 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
788 virtual ~AssertionConsumerServiceImpl() {}
790 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
791 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
793 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
795 IMPL_XMLOBJECT_CLONE_EX(AssertionConsumerService);
798 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
801 virtual ~AuthnQueryServiceImpl() {}
803 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
804 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
806 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
808 IMPL_XMLOBJECT_CLONE_EX(AuthnQueryService);
811 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
814 virtual ~AuthzServiceImpl() {}
816 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
817 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
819 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
821 IMPL_XMLOBJECT_CLONE_EX(AuthzService);
824 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
827 virtual ~AttributeServiceImpl() {}
829 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
830 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
832 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
834 IMPL_XMLOBJECT_CLONE_EX(AttributeService);
837 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
838 public virtual SignableObject,
839 public AbstractComplexElement,
840 public AbstractAttributeExtensibleXMLObject,
841 public AbstractDOMCachingXMLObject,
842 public AbstractXMLObjectMarshaller,
843 public AbstractXMLObjectUnmarshaller
846 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
847 m_ValidUntil=m_CacheDuration=nullptr;
848 m_children.push_back(nullptr);
849 m_children.push_back(nullptr);
850 m_children.push_back(nullptr);
851 m_children.push_back(nullptr);
853 m_Extensions=nullptr;
854 m_Organization=nullptr;
855 m_pos_Signature=m_children.begin();
856 m_pos_Extensions=m_pos_Signature;
858 m_pos_Organization=m_pos_Extensions;
859 ++m_pos_Organization;
860 m_pos_ContactPerson=m_pos_Organization;
861 ++m_pos_ContactPerson;
865 list<XMLObject*>::iterator m_pos_ContactPerson;
867 RoleDescriptorImpl() {
872 virtual ~RoleDescriptorImpl() {
873 XMLString::release(&m_ID);
874 XMLString::release(&m_ProtocolSupportEnumeration);
875 XMLString::release(&m_ErrorURL);
877 delete m_CacheDuration;
880 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
881 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
885 RoleDescriptorImpl(const RoleDescriptorImpl& src)
886 : AbstractXMLObject(src), AbstractComplexElement(src),
887 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
891 void _clone(const RoleDescriptorImpl& src) {
892 IMPL_CLONE_ATTRIB(ID);
893 IMPL_CLONE_ATTRIB(ProtocolSupportEnumeration);
894 IMPL_CLONE_ATTRIB(ErrorURL);
895 IMPL_CLONE_ATTRIB(ValidUntil);
896 IMPL_CLONE_ATTRIB(CacheDuration);
897 IMPL_CLONE_TYPED_CHILD(Signature);
898 IMPL_CLONE_TYPED_CHILD(Extensions);
899 IMPL_CLONE_TYPED_CHILD(Organization);
900 IMPL_CLONE_TYPED_CHILDREN(KeyDescriptor);
901 IMPL_CLONE_TYPED_CHILDREN(ContactPerson);
904 //IMPL_TYPED_CHILD(Signature);
905 // Need customized setter.
907 xmlsignature::Signature* m_Signature;
908 list<XMLObject*>::iterator m_pos_Signature;
910 xmlsignature::Signature* getSignature() const {
914 void setSignature(xmlsignature::Signature* sig) {
915 prepareForAssignment(m_Signature,sig);
916 *m_pos_Signature=m_Signature=sig;
917 // Sync content reference back up.
919 m_Signature->setContentReference(new opensaml::ContentReference(*this));
922 RoleDescriptor* cloneRoleDescriptor() const {
923 return dynamic_cast<RoleDescriptor*>(clone());
926 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
927 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
928 IMPL_STRING_ATTRIB(ErrorURL);
929 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
930 IMPL_DURATION_ATTRIB(CacheDuration,0);
931 IMPL_TYPED_CHILD(Extensions);
932 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
933 IMPL_TYPED_CHILD(Organization);
934 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
936 bool hasSupport(const XMLCh* protocol) const {
937 if (!protocol || !*protocol)
939 if (m_ProtocolSupportEnumeration) {
940 // Look for first character.
941 xsecsize_t len=XMLString::stringLen(protocol);
943 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
945 // Only possible match is if it's the first character or a space comes before it.
946 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
947 // See if rest of protocol string is present.
948 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
949 // Only possible match is if it's the last character or a space comes after it.
950 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
956 // Move past last search and start again.
961 // Move past last search and start again.
964 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
970 void addSupport(const XMLCh* protocol) {
971 if (hasSupport(protocol))
973 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
975 xstring pse(m_ProtocolSupportEnumeration);
976 pse = pse + chSpace + protocol;
977 setProtocolSupportEnumeration(pse.c_str());
979 auto_ptr_char temp(m_ProtocolSupportEnumeration);
980 auto_ptr_char temp2(protocol);
981 string pse(temp.get());
982 pse = pse + ' ' + temp2.get();
983 auto_ptr_XMLCh temp3(pse.c_str());
984 setProtocolSupportEnumeration(temp3.get());
988 setProtocolSupportEnumeration(protocol);
992 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
993 if (!qualifiedName.hasNamespaceURI()) {
994 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
998 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
999 setProtocolSupportEnumeration(value);
1002 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1006 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1007 setValidUntil(value);
1010 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1011 setCacheDuration(value);
1015 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1019 void prepareForMarshalling() const {
1021 declareNonVisibleNamespaces();
1024 void marshallAttributes(DOMElement* domElement) const {
1025 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1026 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
1027 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
1028 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1029 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1030 marshallExtensionAttributes(domElement);
1033 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1034 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1035 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1036 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1037 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1038 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1039 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1042 void processAttribute(const DOMAttr* attribute) {
1043 PROC_ID_ATTRIB(ID,ID,nullptr);
1044 unmarshallExtensionAttribute(attribute);
1048 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1051 virtual ~RoleDescriptorTypeImpl() {}
1053 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1054 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1057 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1060 void _clone(const RoleDescriptorTypeImpl& src) {
1061 RoleDescriptorImpl::_clone(src);
1062 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
1065 IMPL_XMLOBJECT_CLONE_EX(RoleDescriptorType);
1066 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1069 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1070 getUnknownXMLObjects().push_back(childXMLObject);
1074 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1077 m_children.push_back(nullptr);
1078 m_children.push_back(nullptr);
1079 m_children.push_back(nullptr);
1080 m_children.push_back(nullptr);
1081 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1082 ++m_pos_ArtifactResolutionService;
1083 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1084 ++m_pos_SingleLogoutService;
1085 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1086 ++m_pos_ManageNameIDService;
1087 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1088 ++m_pos_NameIDFormat;
1092 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1093 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1094 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1095 list<XMLObject*>::iterator m_pos_NameIDFormat;
1097 SSODescriptorTypeImpl() {
1102 virtual ~SSODescriptorTypeImpl() {}
1104 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1105 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1109 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1113 void _clone(const SSODescriptorTypeImpl& src) {
1114 RoleDescriptorImpl::_clone(src);
1115 IMPL_CLONE_TYPED_CHILDREN(ArtifactResolutionService);
1116 IMPL_CLONE_TYPED_CHILDREN(SingleLogoutService);
1117 IMPL_CLONE_TYPED_CHILDREN(ManageNameIDService);
1118 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1121 SSODescriptorType* cloneSSODescriptorType() const {
1122 return dynamic_cast<SSODescriptorType*>(clone());
1125 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1126 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1127 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1128 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1131 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1132 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1133 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1134 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1135 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1136 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1140 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1142 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1143 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1144 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1145 list<XMLObject*>::iterator m_pos_AttributeProfile;
1148 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1149 m_children.push_back(nullptr);
1150 m_children.push_back(nullptr);
1151 m_children.push_back(nullptr);
1152 m_children.push_back(nullptr);
1153 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1154 ++m_pos_SingleSignOnService;
1155 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1156 ++m_pos_NameIDMappingService;
1157 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1158 ++m_pos_AssertionIDRequestService;
1159 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1160 ++m_pos_AttributeProfile;
1164 virtual ~IDPSSODescriptorImpl() {}
1166 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1167 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1171 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1175 void _clone(const IDPSSODescriptorImpl& src) {
1176 SSODescriptorTypeImpl::_clone(src);
1177 IMPL_CLONE_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1178 IMPL_CLONE_TYPED_CHILDREN(SingleSignOnService);
1179 IMPL_CLONE_TYPED_CHILDREN(NameIDMappingService);
1180 IMPL_CLONE_TYPED_CHILDREN(AssertionIDRequestService);
1181 IMPL_CLONE_TYPED_CHILDREN(AttributeProfile);
1182 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(Attribute,saml2);
1185 IMPL_XMLOBJECT_CLONE_EX(IDPSSODescriptor);
1186 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1187 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1188 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1189 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1190 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1191 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1193 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1194 if (!qualifiedName.hasNamespaceURI()) {
1195 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1196 setWantAuthnRequestsSigned(value);
1200 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1204 void marshallAttributes(DOMElement* domElement) const {
1205 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1206 RoleDescriptorImpl::marshallAttributes(domElement);
1209 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1210 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1211 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1212 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1213 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1214 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1215 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1219 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1220 public AbstractComplexElement,
1221 public AbstractAttributeExtensibleXMLObject,
1222 public AbstractDOMCachingXMLObject,
1223 public AbstractXMLObjectMarshaller,
1224 public AbstractXMLObjectUnmarshaller
1227 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1228 m_isRequired=XML_BOOL_NULL;
1232 virtual ~RequestedAttributeImpl() {
1233 XMLString::release(&m_Name);
1234 XMLString::release(&m_NameFormat);
1235 XMLString::release(&m_FriendlyName);
1238 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1239 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1243 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1244 : AbstractXMLObject(src), AbstractComplexElement(src),
1245 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1247 IMPL_CLONE_ATTRIB(Name);
1248 IMPL_CLONE_ATTRIB(NameFormat);
1249 IMPL_CLONE_ATTRIB(FriendlyName);
1250 IMPL_CLONE_BOOLEAN_ATTRIB(isRequired);
1251 IMPL_CLONE_XMLOBJECT_CHILDREN(AttributeValue);
1254 IMPL_XMLOBJECT_CLONE2(RequestedAttribute,Attribute);
1255 IMPL_STRING_ATTRIB(Name);
1256 IMPL_STRING_ATTRIB(NameFormat);
1257 IMPL_STRING_ATTRIB(FriendlyName);
1258 IMPL_BOOLEAN_ATTRIB(isRequired);
1259 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1261 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1262 if (!qualifiedName.hasNamespaceURI()) {
1263 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1267 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1268 setNameFormat(value);
1271 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1272 setFriendlyName(value);
1275 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1276 setisRequired(value);
1280 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1284 void marshallAttributes(DOMElement* domElement) const {
1285 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1286 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1287 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1288 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1289 marshallExtensionAttributes(domElement);
1292 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1293 getAttributeValues().push_back(childXMLObject);
1296 void processAttribute(const DOMAttr* attribute) {
1297 unmarshallExtensionAttribute(attribute);
1301 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1302 public AbstractComplexElement,
1303 public AbstractDOMCachingXMLObject,
1304 public AbstractXMLObjectMarshaller,
1305 public AbstractXMLObjectUnmarshaller
1307 list<XMLObject*>::iterator m_pos_ServiceDescription;
1308 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1312 m_isDefault=XML_BOOL_NULL;
1313 m_children.push_back(nullptr);
1314 m_children.push_back(nullptr);
1315 m_pos_ServiceDescription=m_children.begin();
1316 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1317 ++m_pos_RequestedAttribute;
1321 virtual ~AttributeConsumingServiceImpl() {
1322 XMLString::release(&m_Index);
1325 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1326 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1330 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1331 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1333 IMPL_CLONE_INTEGER_ATTRIB(Index);
1334 IMPL_CLONE_BOOLEAN_ATTRIB(isDefault);
1335 IMPL_CLONE_TYPED_CHILDREN(ServiceName);
1336 IMPL_CLONE_TYPED_CHILDREN(ServiceDescription);
1337 IMPL_CLONE_TYPED_CHILDREN(RequestedAttribute);
1340 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1341 IMPL_INTEGER_ATTRIB(Index);
1342 IMPL_BOOLEAN_ATTRIB(isDefault);
1343 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1344 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1345 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1348 void marshallAttributes(DOMElement* domElement) const {
1349 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1350 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1353 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1354 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1355 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1356 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1357 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1360 void processAttribute(const DOMAttr* attribute) {
1361 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1362 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1363 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1367 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1369 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1372 m_AuthnRequestsSigned=XML_BOOL_NULL;
1373 m_WantAssertionsSigned=XML_BOOL_NULL;
1374 m_children.push_back(nullptr);
1375 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1376 ++m_pos_AssertionConsumerService;
1380 virtual ~SPSSODescriptorImpl() {}
1382 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1383 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1387 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1391 void _clone(const SPSSODescriptorImpl& src) {
1392 SSODescriptorTypeImpl::_clone(src);
1393 IMPL_CLONE_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1394 IMPL_CLONE_BOOLEAN_ATTRIB(WantAssertionsSigned);
1395 IMPL_CLONE_TYPED_CHILDREN(AssertionConsumerService);
1396 IMPL_CLONE_TYPED_CHILDREN(AttributeConsumingService);
1399 IMPL_XMLOBJECT_CLONE_EX(SPSSODescriptor);
1400 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1401 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1402 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1403 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1405 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1406 if (!qualifiedName.hasNamespaceURI()) {
1407 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1408 setAuthnRequestsSigned(value);
1411 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1412 setWantAssertionsSigned(value);
1416 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1420 void marshallAttributes(DOMElement* domElement) const {
1421 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1422 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1423 RoleDescriptorImpl::marshallAttributes(domElement);
1426 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1427 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1428 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1429 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1433 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1435 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1436 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1439 m_children.push_back(nullptr);
1440 m_children.push_back(nullptr);
1441 m_pos_AuthnQueryService=m_pos_ContactPerson;
1442 ++m_pos_AuthnQueryService;
1443 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1444 ++m_pos_AssertionIDRequestService;
1448 virtual ~AuthnAuthorityDescriptorImpl() {}
1450 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1451 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1455 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1459 void _clone(const AuthnAuthorityDescriptorImpl& src) {
1460 RoleDescriptorImpl::_clone(src);
1461 IMPL_CLONE_TYPED_CHILDREN(AuthnQueryService);
1462 IMPL_CLONE_TYPED_CHILDREN(AssertionIDRequestService);
1463 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1466 IMPL_XMLOBJECT_CLONE_EX(AuthnAuthorityDescriptor);
1467 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1468 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1469 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1472 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1473 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1474 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1475 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1476 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1480 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1482 list<XMLObject*>::iterator m_pos_AuthzService;
1483 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1486 m_children.push_back(nullptr);
1487 m_children.push_back(nullptr);
1488 m_pos_AuthzService=m_pos_ContactPerson;
1489 ++m_pos_AuthzService;
1490 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1491 ++m_pos_AssertionIDRequestService;
1495 virtual ~PDPDescriptorImpl() {}
1497 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1498 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1502 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1506 void _clone(const PDPDescriptorImpl& src) {
1507 RoleDescriptorImpl::_clone(src);
1508 IMPL_CLONE_TYPED_CHILDREN(AuthzService);
1509 IMPL_CLONE_TYPED_CHILDREN(AssertionIDRequestService);
1510 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1513 IMPL_XMLOBJECT_CLONE_EX(PDPDescriptor);
1514 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1515 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1516 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1519 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1520 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1521 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1522 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1523 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1527 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1529 list<XMLObject*>::iterator m_pos_AttributeService;
1530 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1531 list<XMLObject*>::iterator m_pos_NameIDFormat;
1532 list<XMLObject*>::iterator m_pos_AttributeProfile;
1535 m_children.push_back(nullptr);
1536 m_children.push_back(nullptr);
1537 m_children.push_back(nullptr);
1538 m_children.push_back(nullptr);
1539 m_pos_AttributeService=m_pos_ContactPerson;
1540 ++m_pos_AttributeService;
1541 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1542 ++m_pos_AssertionIDRequestService;
1543 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1544 ++m_pos_NameIDFormat;
1545 m_pos_AttributeProfile=m_pos_NameIDFormat;
1546 ++m_pos_AttributeProfile;
1550 virtual ~AttributeAuthorityDescriptorImpl() {}
1552 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1553 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1557 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1561 void _clone(const AttributeAuthorityDescriptorImpl& src) {
1562 RoleDescriptorImpl::_clone(src);
1563 IMPL_CLONE_TYPED_CHILDREN(AttributeService);
1564 IMPL_CLONE_TYPED_CHILDREN(AssertionIDRequestService);
1565 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1566 IMPL_CLONE_TYPED_CHILDREN(AttributeProfile);
1567 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(Attribute,saml2);
1570 IMPL_XMLOBJECT_CLONE_EX(AttributeAuthorityDescriptor);
1571 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1572 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1573 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1574 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1575 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1578 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1579 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1580 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1581 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1582 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1583 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1584 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1588 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1591 m_WantAssertionsSigned=XML_BOOL_NULL;
1592 m_children.push_back(nullptr);
1593 m_pos_NameIDFormat=m_pos_ContactPerson;
1594 ++m_pos_NameIDFormat;
1598 list<XMLObject*>::iterator m_pos_NameIDFormat;
1600 QueryDescriptorTypeImpl() {
1605 virtual ~QueryDescriptorTypeImpl() {}
1607 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1608 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1612 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1616 void _clone(const QueryDescriptorTypeImpl& src) {
1617 RoleDescriptorImpl::_clone(src);
1618 IMPL_CLONE_BOOLEAN_ATTRIB(WantAssertionsSigned);
1619 IMPL_CLONE_TYPED_CHILDREN(NameIDFormat);
1622 QueryDescriptorType* cloneQueryDescriptorType() const {
1623 return dynamic_cast<QueryDescriptorType*>(clone());
1626 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1627 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1629 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1630 if (!qualifiedName.hasNamespaceURI()) {
1631 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1632 setWantAssertionsSigned(value);
1636 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1640 void marshallAttributes(DOMElement* domElement) const {
1641 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1642 RoleDescriptorImpl::marshallAttributes(domElement);
1645 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1646 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1647 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1651 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1654 virtual ~AuthnQueryDescriptorTypeImpl() {}
1656 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1657 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1659 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1661 IMPL_XMLOBJECT_CLONE_EX(AuthnQueryDescriptorType);
1664 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1667 virtual ~AttributeQueryDescriptorTypeImpl() {}
1669 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1670 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1672 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1675 void _clone(const AttributeQueryDescriptorTypeImpl& src) {
1676 QueryDescriptorTypeImpl::_clone(src);
1677 IMPL_CLONE_TYPED_CHILDREN(AttributeConsumingService);
1680 IMPL_XMLOBJECT_CLONE_EX(AttributeQueryDescriptorType);
1681 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1684 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1685 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1686 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1690 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1693 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1695 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1696 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1698 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1701 void _clone(const AuthzDecisionQueryDescriptorTypeImpl& src) {
1702 QueryDescriptorTypeImpl::_clone(src);
1703 IMPL_CLONE_TYPED_CHILDREN(ActionNamespace);
1706 IMPL_XMLOBJECT_CLONE_EX(AuthzDecisionQueryDescriptorType);
1707 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1710 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1711 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1712 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1716 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1717 public virtual SignableObject,
1718 public AbstractComplexElement,
1719 public AbstractAttributeExtensibleXMLObject,
1720 public AbstractDOMCachingXMLObject,
1721 public AbstractXMLObjectMarshaller,
1722 public AbstractXMLObjectUnmarshaller
1724 list<XMLObject*>::iterator m_pos_AffiliateMember;
1727 m_ID=m_AffiliationOwnerID=nullptr;
1728 m_ValidUntil=m_CacheDuration=nullptr;
1729 m_children.push_back(nullptr);
1730 m_children.push_back(nullptr);
1731 m_children.push_back(nullptr);
1732 m_Signature=nullptr;
1733 m_Extensions=nullptr;
1734 m_pos_Signature=m_children.begin();
1735 m_pos_Extensions=m_pos_Signature;
1737 m_pos_AffiliateMember=m_pos_Extensions;
1738 ++m_pos_AffiliateMember;
1742 virtual ~AffiliationDescriptorImpl() {
1743 XMLString::release(&m_ID);
1744 XMLString::release(&m_AffiliationOwnerID);
1745 delete m_ValidUntil;
1746 delete m_CacheDuration;
1749 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1750 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1754 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1755 : AbstractXMLObject(src), AbstractComplexElement(src),
1756 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1758 IMPL_CLONE_ATTRIB(ID);
1759 IMPL_CLONE_ATTRIB(AffiliationOwnerID);
1760 IMPL_CLONE_ATTRIB(ValidUntil);
1761 IMPL_CLONE_ATTRIB(CacheDuration);
1762 IMPL_CLONE_TYPED_CHILD(Signature);
1763 IMPL_CLONE_TYPED_CHILD(Extensions);
1764 IMPL_CLONE_TYPED_CHILDREN(KeyDescriptor);
1765 IMPL_CLONE_TYPED_CHILDREN(AffiliateMember);
1768 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1770 //IMPL_TYPED_CHILD(Signature);
1771 // Need customized setter.
1773 xmlsignature::Signature* m_Signature;
1774 list<XMLObject*>::iterator m_pos_Signature;
1776 xmlsignature::Signature* getSignature() const {
1780 void setSignature(xmlsignature::Signature* sig) {
1781 prepareForAssignment(m_Signature,sig);
1782 *m_pos_Signature=m_Signature=sig;
1783 // Sync content reference back up.
1785 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1788 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1789 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1790 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1791 IMPL_DURATION_ATTRIB(CacheDuration,0);
1792 IMPL_TYPED_CHILD(Extensions);
1793 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1794 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1796 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1797 if (!qualifiedName.hasNamespaceURI()) {
1798 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1802 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1803 setAffiliationOwnerID(value);
1806 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1807 setValidUntil(value);
1810 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1811 setCacheDuration(value);
1815 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1819 void prepareForMarshalling() const {
1821 declareNonVisibleNamespaces();
1824 void marshallAttributes(DOMElement* domElement) const {
1825 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1826 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
1827 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1828 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1829 marshallExtensionAttributes(domElement);
1832 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1833 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1834 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1835 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
1836 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1837 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1840 void processAttribute(const DOMAttr* attribute) {
1841 PROC_ID_ATTRIB(ID,ID,nullptr);
1842 unmarshallExtensionAttribute(attribute);
1846 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
1847 public virtual SignableObject,
1848 public AbstractComplexElement,
1849 public AbstractAttributeExtensibleXMLObject,
1850 public AbstractDOMCachingXMLObject,
1851 public AbstractXMLObjectMarshaller,
1852 public AbstractXMLObjectUnmarshaller
1854 list<XMLObject*>::iterator m_pos_ContactPerson;
1857 m_ID=m_EntityID=nullptr;
1858 m_ValidUntil=m_CacheDuration=nullptr;
1859 m_children.push_back(nullptr);
1860 m_children.push_back(nullptr);
1861 m_children.push_back(nullptr);
1862 m_children.push_back(nullptr);
1863 m_children.push_back(nullptr);
1864 m_Signature=nullptr;
1865 m_Extensions=nullptr;
1866 m_AffiliationDescriptor=nullptr;
1867 m_Organization=nullptr;
1868 m_pos_Signature=m_children.begin();
1869 m_pos_Extensions=m_pos_Signature;
1871 m_pos_AffiliationDescriptor=m_pos_Extensions;
1872 ++m_pos_AffiliationDescriptor;
1873 m_pos_Organization=m_pos_AffiliationDescriptor;
1874 ++m_pos_Organization;
1875 m_pos_ContactPerson=m_pos_Organization;
1876 ++m_pos_ContactPerson;
1880 virtual ~EntityDescriptorImpl() {
1881 XMLString::release(&m_ID);
1882 XMLString::release(&m_EntityID);
1883 delete m_ValidUntil;
1884 delete m_CacheDuration;
1887 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1888 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1892 EntityDescriptorImpl(const EntityDescriptorImpl& src)
1893 : AbstractXMLObject(src), AbstractComplexElement(src),
1894 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1896 IMPL_CLONE_ATTRIB(ID);
1897 IMPL_CLONE_ATTRIB(EntityID);
1898 IMPL_CLONE_ATTRIB(ValidUntil);
1899 IMPL_CLONE_ATTRIB(CacheDuration);
1900 IMPL_CLONE_TYPED_CHILD(Signature);
1901 IMPL_CLONE_TYPED_CHILD(Extensions);
1902 IMPL_CLONE_TYPED_CHILD(AffiliationDescriptor);
1903 IMPL_CLONE_TYPED_CHILD(Organization);
1905 IMPL_CLONE_CHILDBAG_BEGIN;
1906 IMPL_CLONE_TYPED_CHILD_IN_BAG(IDPSSODescriptor);
1907 IMPL_CLONE_TYPED_CHILD_IN_BAG(SPSSODescriptor);
1908 IMPL_CLONE_TYPED_CHILD_IN_BAG(AuthnAuthorityDescriptor);
1909 IMPL_CLONE_TYPED_CHILD_IN_BAG(AttributeAuthorityDescriptor);
1910 IMPL_CLONE_TYPED_CHILD_IN_BAG(PDPDescriptor);
1911 IMPL_CLONE_TYPED_CHILD_IN_BAG(AuthnQueryDescriptorType);
1912 IMPL_CLONE_TYPED_CHILD_IN_BAG(AttributeQueryDescriptorType);
1913 IMPL_CLONE_TYPED_CHILD_IN_BAG(AuthzDecisionQueryDescriptorType);
1914 IMPL_CLONE_TYPED_CHILD_IN_BAG(RoleDescriptor);
1915 IMPL_CLONE_CHILDBAG_END;
1917 IMPL_CLONE_TYPED_CHILDREN(ContactPerson);
1918 IMPL_CLONE_TYPED_CHILDREN(AdditionalMetadataLocation);
1921 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
1923 //IMPL_TYPED_CHILD(Signature);
1924 // Need customized setter.
1926 xmlsignature::Signature* m_Signature;
1927 list<XMLObject*>::iterator m_pos_Signature;
1929 xmlsignature::Signature* getSignature() const {
1933 void setSignature(xmlsignature::Signature* sig) {
1934 prepareForAssignment(m_Signature,sig);
1935 *m_pos_Signature=m_Signature=sig;
1936 // Sync content reference back up.
1938 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1941 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1942 IMPL_STRING_ATTRIB(EntityID);
1943 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1944 IMPL_DURATION_ATTRIB(CacheDuration,0);
1945 IMPL_TYPED_CHILD(Extensions);
1946 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
1947 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
1948 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
1949 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
1950 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
1951 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
1952 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
1953 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
1954 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
1955 IMPL_TYPED_CHILD(AffiliationDescriptor);
1956 IMPL_TYPED_CHILD(Organization);
1957 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1958 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
1960 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1961 if (!qualifiedName.hasNamespaceURI()) {
1962 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1966 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
1970 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1971 setValidUntil(value);
1974 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1975 setCacheDuration(value);
1979 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1982 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
1983 // Check for "known" elements/types.
1984 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
1985 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
1986 if (qname == SPSSODescriptor::ELEMENT_QNAME)
1987 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
1988 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
1989 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
1990 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
1991 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
1992 if (qname == PDPDescriptor::ELEMENT_QNAME)
1993 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
1994 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
1995 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
1996 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
1997 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
1998 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
1999 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2001 vector<RoleDescriptor*>::const_iterator i =
2002 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2003 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2007 void prepareForMarshalling() const {
2009 declareNonVisibleNamespaces();
2012 void marshallAttributes(DOMElement* domElement) const {
2013 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2014 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2015 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2016 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2017 marshallExtensionAttributes(domElement);
2020 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2021 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2022 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2023 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2024 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2025 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2026 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2027 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2028 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2029 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2030 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2031 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2032 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2033 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2034 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2035 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2036 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2039 void processAttribute(const DOMAttr* attribute) {
2040 PROC_ID_ATTRIB(ID,ID,nullptr);
2041 unmarshallExtensionAttribute(attribute);
2045 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2046 public virtual SignableObject,
2047 public AbstractComplexElement,
2048 public AbstractDOMCachingXMLObject,
2049 public AbstractXMLObjectMarshaller,
2050 public AbstractXMLObjectUnmarshaller
2053 m_ID=m_Name=nullptr;
2054 m_ValidUntil=m_CacheDuration=nullptr;
2055 m_children.push_back(nullptr);
2056 m_children.push_back(nullptr);
2057 m_Signature=nullptr;
2058 m_Extensions=nullptr;
2059 m_pos_Signature=m_children.begin();
2060 m_pos_Extensions=m_pos_Signature;
2065 virtual ~EntitiesDescriptorImpl() {
2066 XMLString::release(&m_ID);
2067 XMLString::release(&m_Name);
2068 delete m_ValidUntil;
2069 delete m_CacheDuration;
2072 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2073 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2077 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2078 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2080 IMPL_CLONE_ATTRIB(ID);
2081 IMPL_CLONE_ATTRIB(Name);
2082 IMPL_CLONE_ATTRIB(ValidUntil);
2083 IMPL_CLONE_ATTRIB(CacheDuration);
2084 IMPL_CLONE_TYPED_CHILD(Signature);
2085 IMPL_CLONE_TYPED_CHILD(Extensions);
2087 IMPL_CLONE_CHILDBAG_BEGIN;
2088 IMPL_CLONE_TYPED_CHILD_IN_BAG(EntityDescriptor);
2089 IMPL_CLONE_TYPED_CHILD_IN_BAG(EntitiesDescriptor);
2090 IMPL_CLONE_CHILDBAG_END;
2093 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2095 //IMPL_TYPED_CHILD(Signature);
2096 // Need customized setter.
2098 xmlsignature::Signature* m_Signature;
2099 list<XMLObject*>::iterator m_pos_Signature;
2101 xmlsignature::Signature* getSignature() const {
2105 void setSignature(xmlsignature::Signature* sig) {
2106 prepareForAssignment(m_Signature,sig);
2107 *m_pos_Signature=m_Signature=sig;
2108 // Sync content reference back up.
2110 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2113 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2114 IMPL_STRING_ATTRIB(Name);
2115 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2116 IMPL_DURATION_ATTRIB(CacheDuration,0);
2117 IMPL_TYPED_CHILD(Extensions);
2118 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2119 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2122 void prepareForMarshalling() const {
2124 declareNonVisibleNamespaces();
2127 void marshallAttributes(DOMElement* domElement) const {
2128 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2129 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2130 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2131 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2134 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2135 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2136 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2137 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2138 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2139 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2142 void processAttribute(const DOMAttr* attribute) {
2143 PROC_ID_ATTRIB(ID,ID,nullptr);
2144 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2145 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2146 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2150 class SAML_DLLLOCAL DiscoveryResponseImpl : public virtual DiscoveryResponse, public IndexedEndpointTypeImpl
2153 virtual ~DiscoveryResponseImpl() {}
2155 DiscoveryResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2156 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2158 DiscoveryResponseImpl(const DiscoveryResponseImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
2160 IMPL_XMLOBJECT_CLONE_EX(DiscoveryResponse);
2163 class SAML_DLLLOCAL RequestInitiatorImpl : public virtual RequestInitiator, public EndpointTypeImpl
2166 virtual ~RequestInitiatorImpl() {}
2168 RequestInitiatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2169 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2171 RequestInitiatorImpl(const RequestInitiatorImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
2173 IMPL_XMLOBJECT_CLONE_EX(RequestInitiator);
2176 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2177 public AbstractComplexElement,
2178 public AbstractDOMCachingXMLObject,
2179 public AbstractXMLObjectMarshaller,
2180 public AbstractXMLObjectUnmarshaller
2183 virtual ~EntityAttributesImpl() {}
2185 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2186 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2189 EntityAttributesImpl(const EntityAttributesImpl& src)
2190 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2191 IMPL_CLONE_CHILDBAG_BEGIN;
2192 IMPL_CLONE_TYPED_FOREIGN_CHILD_IN_BAG(Attribute,saml2);
2193 IMPL_CLONE_TYPED_FOREIGN_CHILD_IN_BAG(Assertion,saml2);
2194 IMPL_CLONE_CHILDBAG_END;
2197 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2198 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2199 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2202 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2203 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2204 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2205 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2209 class SAML_DLLLOCAL DigestMethodImpl : public virtual DigestMethod,
2210 public AbstractComplexElement,
2211 public AbstractDOMCachingXMLObject,
2212 public AbstractXMLObjectMarshaller,
2213 public AbstractXMLObjectUnmarshaller
2216 virtual ~DigestMethodImpl() {
2217 XMLString::release(&m_Algorithm);
2220 DigestMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2221 : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Algorithm(nullptr) {
2224 DigestMethodImpl(const DigestMethodImpl& src)
2225 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src), m_Algorithm(nullptr) {
2226 IMPL_CLONE_ATTRIB(Algorithm);
2227 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
2230 IMPL_XMLOBJECT_CLONE(DigestMethod);
2231 IMPL_STRING_ATTRIB(Algorithm);
2232 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2235 void marshallAttributes(DOMElement* domElement) const {
2236 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2239 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2241 getUnknownXMLObjects().push_back(childXMLObject);
2244 void processAttribute(const DOMAttr* attribute) {
2245 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2249 class SAML_DLLLOCAL SigningMethodImpl : public virtual SigningMethod,
2250 public AbstractComplexElement,
2251 public AbstractDOMCachingXMLObject,
2252 public AbstractXMLObjectMarshaller,
2253 public AbstractXMLObjectUnmarshaller
2256 m_Algorithm = m_MinKeySize = m_MaxKeySize = nullptr;
2260 virtual ~SigningMethodImpl() {
2261 XMLString::release(&m_Algorithm);
2262 XMLString::release(&m_MinKeySize);
2263 XMLString::release(&m_MaxKeySize);
2266 SigningMethodImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2267 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2271 SigningMethodImpl(const SigningMethodImpl& src)
2272 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2274 IMPL_CLONE_ATTRIB(Algorithm);
2275 IMPL_CLONE_INTEGER_ATTRIB(MinKeySize);
2276 IMPL_CLONE_INTEGER_ATTRIB(MaxKeySize);
2277 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
2280 IMPL_XMLOBJECT_CLONE(SigningMethod);
2281 IMPL_STRING_ATTRIB(Algorithm);
2282 IMPL_INTEGER_ATTRIB(MinKeySize);
2283 IMPL_INTEGER_ATTRIB(MaxKeySize);
2284 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2287 void marshallAttributes(DOMElement* domElement) const {
2288 MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2289 MARSHALL_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2290 MARSHALL_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2293 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2295 getUnknownXMLObjects().push_back(childXMLObject);
2298 void processAttribute(const DOMAttr* attribute) {
2299 PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
2300 PROC_INTEGER_ATTRIB(MinKeySize,MINKEYSIZE,nullptr);
2301 PROC_INTEGER_ATTRIB(MaxKeySize,MAXKEYSIZE,nullptr);
2305 class SAML_DLLLOCAL DisplayNameImpl : public virtual DisplayName, public localizedNameTypeImpl
2308 virtual ~DisplayNameImpl() {}
2310 DisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2311 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2313 DisplayNameImpl(const DisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2315 IMPL_XMLOBJECT_CLONE_EX(DisplayName);
2318 class SAML_DLLLOCAL DescriptionImpl : public virtual Description, public localizedNameTypeImpl
2321 virtual ~DescriptionImpl() {}
2323 DescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2324 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2326 DescriptionImpl(const DescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
2328 IMPL_XMLOBJECT_CLONE_EX(Description);
2331 class SAML_DLLLOCAL InformationURLImpl : public virtual InformationURL, public localizedURITypeImpl
2334 virtual ~InformationURLImpl() {}
2336 InformationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2337 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2339 InformationURLImpl(const InformationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2341 IMPL_XMLOBJECT_CLONE_EX(InformationURL);
2344 class SAML_DLLLOCAL PrivacyStatementURLImpl : public virtual PrivacyStatementURL, public localizedURITypeImpl
2347 virtual ~PrivacyStatementURLImpl() {}
2349 PrivacyStatementURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2350 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
2352 PrivacyStatementURLImpl(const PrivacyStatementURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
2354 IMPL_XMLOBJECT_CLONE_EX(PrivacyStatementURL);
2357 class SAML_DLLLOCAL KeywordsImpl : public virtual Keywords,
2358 public AbstractSimpleElement,
2359 public AbstractDOMCachingXMLObject,
2360 public AbstractXMLObjectMarshaller,
2361 public AbstractXMLObjectUnmarshaller
2365 m_LangPrefix=nullptr;
2374 virtual ~KeywordsImpl() {
2375 XMLString::release(&m_Lang);
2376 XMLString::release(&m_LangPrefix);
2379 KeywordsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2380 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2384 KeywordsImpl(const KeywordsImpl& src)
2385 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2387 IMPL_CLONE_FOREIGN_ATTRIB(Lang);
2390 IMPL_XMLOBJECT_CLONE(Keywords);
2391 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2394 void marshallAttributes(DOMElement* domElement) const {
2395 if (m_Lang && *m_Lang) {
2396 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2397 if (m_LangPrefix && *m_LangPrefix)
2398 attr->setPrefix(m_LangPrefix);
2400 attr->setPrefix(xmlconstants::XML_PREFIX);
2401 attr->setNodeValue(m_Lang);
2402 domElement->setAttributeNodeNS(attr);
2406 void processAttribute(const DOMAttr* attribute) {
2407 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2408 setLang(attribute->getValue());
2409 const XMLCh* temp = attribute->getPrefix();
2410 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2411 m_LangPrefix = XMLString::replicate(temp);
2414 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2418 class SAML_DLLLOCAL LogoImpl : public virtual Logo,
2419 public AbstractSimpleElement,
2420 public AbstractDOMCachingXMLObject,
2421 public AbstractXMLObjectMarshaller,
2422 public AbstractXMLObjectUnmarshaller
2426 m_LangPrefix=nullptr;
2437 virtual ~LogoImpl() {
2438 XMLString::release(&m_Lang);
2439 XMLString::release(&m_LangPrefix);
2440 XMLString::release(&m_Height);
2441 XMLString::release(&m_Width);
2444 LogoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2445 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2449 LogoImpl(const LogoImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
2451 IMPL_CLONE_FOREIGN_ATTRIB(Lang);
2452 IMPL_CLONE_INTEGER_ATTRIB(Height);
2453 IMPL_CLONE_INTEGER_ATTRIB(Width);
2456 IMPL_XMLOBJECT_CLONE(Logo);
2457 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
2458 IMPL_INTEGER_ATTRIB(Height);
2459 IMPL_INTEGER_ATTRIB(Width);
2462 void marshallAttributes(DOMElement* domElement) const {
2463 if (m_Lang && *m_Lang) {
2464 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS, LANG_ATTRIB_NAME);
2465 if (m_LangPrefix && *m_LangPrefix)
2466 attr->setPrefix(m_LangPrefix);
2468 attr->setPrefix(xmlconstants::XML_PREFIX);
2469 attr->setNodeValue(m_Lang);
2470 domElement->setAttributeNodeNS(attr);
2472 MARSHALL_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2473 MARSHALL_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2476 void processAttribute(const DOMAttr* attribute) {
2477 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
2478 setLang(attribute->getValue());
2479 const XMLCh* temp = attribute->getPrefix();
2480 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
2481 m_LangPrefix = XMLString::replicate(temp);
2484 PROC_INTEGER_ATTRIB(Height,HEIGHT,nullptr);
2485 PROC_INTEGER_ATTRIB(Width,WIDTH,nullptr);
2486 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
2490 class SAML_DLLLOCAL UIInfoImpl : public virtual UIInfo,
2491 public AbstractComplexElement,
2492 public AbstractDOMCachingXMLObject,
2493 public AbstractXMLObjectMarshaller,
2494 public AbstractXMLObjectUnmarshaller
2497 virtual ~UIInfoImpl() {}
2499 UIInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2500 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2503 UIInfoImpl(const UIInfoImpl& src)
2504 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2505 IMPL_CLONE_CHILDBAG_BEGIN;
2506 IMPL_CLONE_TYPED_CHILD_IN_BAG(DisplayName);
2507 IMPL_CLONE_TYPED_CHILD_IN_BAG(Description);
2508 IMPL_CLONE_TYPED_CHILD_IN_BAG(Keywords);
2509 IMPL_CLONE_TYPED_CHILD_IN_BAG(Logo);
2510 IMPL_CLONE_TYPED_CHILD_IN_BAG(InformationURL);
2511 IMPL_CLONE_TYPED_CHILD_IN_BAG(PrivacyStatementURL);
2512 IMPL_CLONE_XMLOBJECT_CHILD_IN_BAG(UnknownXMLObject);
2513 IMPL_CLONE_CHILDBAG_END;
2516 IMPL_XMLOBJECT_CLONE(UIInfo);
2517 IMPL_TYPED_CHILDREN(DisplayName,m_children.end());
2518 IMPL_TYPED_CHILDREN(Description,m_children.end());
2519 IMPL_TYPED_CHILDREN(Keywords,m_children.end());
2520 IMPL_TYPED_CHILDREN(Logo,m_children.end());
2521 IMPL_TYPED_CHILDREN(InformationURL,m_children.end());
2522 IMPL_TYPED_CHILDREN(PrivacyStatementURL,m_children.end());
2523 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2526 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2527 PROC_TYPED_CHILDREN(DisplayName,SAML20MD_UI_NS,false);
2528 PROC_TYPED_CHILDREN(Description,SAML20MD_UI_NS,false);
2529 PROC_TYPED_CHILDREN(Keywords,SAML20MD_UI_NS,false);
2530 PROC_TYPED_CHILDREN(Logo,SAML20MD_UI_NS,false);
2531 PROC_TYPED_CHILDREN(InformationURL,SAML20MD_UI_NS,false);
2532 PROC_TYPED_CHILDREN(PrivacyStatementURL,SAML20MD_UI_NS,false);
2535 const XMLCh* nsURI=root->getNamespaceURI();
2536 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2537 getUnknownXMLObjects().push_back(childXMLObject);
2541 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2545 class SAML_DLLLOCAL DiscoHintsImpl : public virtual DiscoHints,
2546 public AbstractComplexElement,
2547 public AbstractDOMCachingXMLObject,
2548 public AbstractXMLObjectMarshaller,
2549 public AbstractXMLObjectUnmarshaller
2552 virtual ~DiscoHintsImpl() {}
2554 DiscoHintsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2555 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2558 DiscoHintsImpl(const DiscoHintsImpl& src)
2559 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2560 IMPL_CLONE_CHILDBAG_BEGIN;
2561 IMPL_CLONE_TYPED_CHILD_IN_BAG(IPHint);
2562 IMPL_CLONE_TYPED_CHILD_IN_BAG(DomainHint);
2563 IMPL_CLONE_TYPED_CHILD_IN_BAG(GeolocationHint);
2564 IMPL_CLONE_XMLOBJECT_CHILD_IN_BAG(UnknownXMLObject);
2565 IMPL_CLONE_CHILDBAG_END;
2568 IMPL_XMLOBJECT_CLONE(DiscoHints);
2569 IMPL_TYPED_CHILDREN(IPHint,m_children.end());
2570 IMPL_TYPED_CHILDREN(DomainHint,m_children.end());
2571 IMPL_TYPED_CHILDREN(GeolocationHint,m_children.end());
2572 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
2575 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2576 PROC_TYPED_CHILDREN(IPHint,SAML20MD_UI_NS,false);
2577 PROC_TYPED_CHILDREN(DomainHint,SAML20MD_UI_NS,false);
2578 PROC_TYPED_CHILDREN(GeolocationHint,SAML20MD_UI_NS,false);
2581 const XMLCh* nsURI=root->getNamespaceURI();
2582 if (!XMLString::equals(nsURI,SAML20MD_UI_NS) && nsURI && *nsURI) {
2583 getUnknownXMLObjects().push_back(childXMLObject);
2587 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2594 #if defined (_MSC_VER)
2595 #pragma warning( pop )
2598 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2599 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2600 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2601 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2602 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2603 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2604 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2605 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2607 // Builder Implementations
2609 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2610 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2611 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2612 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2613 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2614 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2615 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2616 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2617 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2618 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2619 IMPL_XMLOBJECTBUILDER(AttributeService);
2620 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2621 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2622 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2623 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2624 IMPL_XMLOBJECTBUILDER(AuthzService);
2625 IMPL_XMLOBJECTBUILDER(Company);
2626 IMPL_XMLOBJECTBUILDER(ContactPerson);
2627 IMPL_XMLOBJECTBUILDER(EmailAddress);
2628 IMPL_XMLOBJECTBUILDER(EndpointType);
2629 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2630 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2631 IMPL_XMLOBJECTBUILDER(Extensions);
2632 IMPL_XMLOBJECTBUILDER(GivenName);
2633 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2634 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2635 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2636 IMPL_XMLOBJECTBUILDER(localizedNameType);
2637 IMPL_XMLOBJECTBUILDER(localizedURIType);
2638 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2639 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2640 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2641 IMPL_XMLOBJECTBUILDER(Organization);
2642 IMPL_XMLOBJECTBUILDER(OrganizationName);
2643 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2644 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2645 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2646 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2647 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2648 IMPL_XMLOBJECTBUILDER(ServiceName);
2649 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2650 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2651 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2652 IMPL_XMLOBJECTBUILDER(SurName);
2653 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2655 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2656 IMPL_XMLOBJECTBUILDER(SourceID);
2657 IMPL_XMLOBJECTBUILDER(DiscoveryResponse);
2658 IMPL_XMLOBJECTBUILDER(RequestInitiator);
2659 IMPL_XMLOBJECTBUILDER(EntityAttributes);
2660 IMPL_XMLOBJECTBUILDER(DigestMethod);
2661 IMPL_XMLOBJECTBUILDER(SigningMethod);
2662 IMPL_XMLOBJECTBUILDER(DisplayName);
2663 IMPL_XMLOBJECTBUILDER(Description);
2664 IMPL_XMLOBJECTBUILDER(Keywords);
2665 IMPL_XMLOBJECTBUILDER(Logo);
2666 IMPL_XMLOBJECTBUILDER(InformationURL);
2667 IMPL_XMLOBJECTBUILDER(PrivacyStatementURL);
2668 IMPL_XMLOBJECTBUILDER(UIInfo);
2669 IMPL_XMLOBJECTBUILDER(IPHint);
2670 IMPL_XMLOBJECTBUILDER(DomainHint);
2671 IMPL_XMLOBJECTBUILDER(GeolocationHint);
2672 IMPL_XMLOBJECTBUILDER(DiscoHints);
2674 #ifdef HAVE_COVARIANT_RETURNS
2675 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2677 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2679 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
2682 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2685 const DigestMethod* RoleDescriptor::getDigestMethod() const
2687 bool roleLevel = false;
2688 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
2690 if (getExtensions()) {
2691 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
2692 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2693 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
2695 if (dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
2703 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
2704 if (entity && entity->getExtensions()) {
2705 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
2706 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2707 const opensaml::saml2md::DigestMethod* dm = dynamic_cast<opensaml::saml2md::DigestMethod*>(*i);
2708 if (dm && dm->getAlgorithm() && conf.isXMLAlgorithmSupported(dm->getAlgorithm(), XMLToolingConfig::ALGTYPE_DIGEST))
2717 pair<const SigningMethod*,const Credential*> RoleDescriptor::getSigningMethod(const CredentialResolver& resolver, CredentialCriteria& cc) const
2719 bool roleLevel = false;
2720 XMLToolingConfig& conf = XMLToolingConfig::getConfig();
2722 if (getExtensions()) {
2723 const vector<XMLObject*>& exts = const_cast<const Extensions*>(getExtensions())->getUnknownXMLObjects();
2724 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2725 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
2728 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
2729 cc.setXMLAlgorithm(sm->getAlgorithm());
2730 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
2731 if (minsize.first || maxsize.first) {
2732 cc.setKeySize(minsize.first ? minsize.second : 0);
2733 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
2737 cc.setMaxKeySize(0);
2739 const Credential* cred = resolver.resolve(&cc);
2741 return make_pair(sm, cred);
2748 const EntityDescriptor* entity = dynamic_cast<EntityDescriptor*>(getParent());
2749 if (entity && entity->getExtensions()) {
2750 const vector<XMLObject*>& exts = const_cast<const Extensions*>(entity->getExtensions())->getUnknownXMLObjects();
2751 for (vector<XMLObject*>::const_iterator i = exts.begin(); i != exts.end(); ++i) {
2752 const SigningMethod* sm = dynamic_cast<SigningMethod*>(*i);
2754 if (sm->getAlgorithm() && conf.isXMLAlgorithmSupported(sm->getAlgorithm(), XMLToolingConfig::ALGTYPE_SIGN)) {
2755 cc.setXMLAlgorithm(sm->getAlgorithm());
2756 pair<bool,int> minsize = sm->getMinKeySize(), maxsize = sm->getMaxKeySize();
2757 if (minsize.first || maxsize.first) {
2758 cc.setKeySize(minsize.first ? minsize.second : 0);
2759 cc.setMaxKeySize(maxsize.first ? maxsize.second : UINT_MAX);
2763 cc.setMaxKeySize(0);
2765 const Credential* cred = resolver.resolve(&cc);
2767 return make_pair(sm, cred);
2775 cc.setMaxKeySize(0);
2776 cc.setXMLAlgorithm(nullptr);
2777 return pair<const SigningMethod*,const Credential*>(nullptr, resolver.resolve(&cc));
2780 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2781 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);
2782 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);
2783 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2784 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2785 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);
2786 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);
2787 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2788 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);
2789 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);
2790 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);
2791 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);
2792 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);
2793 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);
2794 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);
2795 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);
2796 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2797 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2798 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2799 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2800 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);
2801 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2802 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);
2803 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);
2804 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2805 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);
2806 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);
2807 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2808 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);
2809 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2810 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2811 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2812 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2813 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2814 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2815 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2816 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2817 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2818 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2819 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2820 const XMLCh Description::LOCAL_NAME[] = UNICODE_LITERAL_11(D,e,s,c,r,i,p,t,i,o,n);
2821 const XMLCh DigestMethod::LOCAL_NAME[] = UNICODE_LITERAL_12(D,i,g,e,s,t,M,e,t,h,o,d);
2822 const XMLCh DigestMethod::TYPE_NAME[] = UNICODE_LITERAL_16(D,i,g,e,s,t,M,e,t,h,o,d,T,y,p,e);
2823 const XMLCh DigestMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
2824 const XMLCh DiscoHints::LOCAL_NAME[] = UNICODE_LITERAL_10(D,i,s,c,o,H,i,n,t,s);
2825 const XMLCh DiscoHints::TYPE_NAME[] = UNICODE_LITERAL_14(D,i,s,c,o,H,i,n,t,s,T,y,p,e);
2826 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);
2827 const XMLCh DisplayName::LOCAL_NAME[] = UNICODE_LITERAL_11(D,i,s,p,l,a,y,N,a,m,e);
2828 const XMLCh DomainHint::LOCAL_NAME[] = UNICODE_LITERAL_10(D,o,m,a,i,n,H,i,n,t);
2829 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2830 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2831 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2832 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2833 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2834 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);
2835 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);
2836 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);
2837 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2838 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2839 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2840 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);
2841 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2842 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2843 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
2844 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);
2845 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2846 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2847 const XMLCh GeolocationHint::LOCAL_NAME[] = UNICODE_LITERAL_15(G,e,o,l,o,c,a,t,i,o,n,H,i,n,t);
2848 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2849 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2850 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);
2851 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);
2852 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2853 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);
2854 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2855 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2856 const XMLCh InformationURL::LOCAL_NAME[] = UNICODE_LITERAL_14(I,n,f,o,r,m,a,t,i,o,n,U,R,L);
2857 const XMLCh IPHint::LOCAL_NAME[] = UNICODE_LITERAL_6(I,P,H,i,n,t);
2858 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2859 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);
2860 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2861 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2862 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2863 const XMLCh Keywords::LOCAL_NAME[] = UNICODE_LITERAL_8(K,e,y,w,o,r,d,s);
2864 const XMLCh Keywords::TYPE_NAME[] = UNICODE_LITERAL_12(K,e,y,w,o,r,d,s,T,y,p,e);
2865 const XMLCh Keywords::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2866 const XMLCh Logo::LOCAL_NAME[] = UNICODE_LITERAL_4(L,o,g,o);
2867 const XMLCh Logo::TYPE_NAME[] = UNICODE_LITERAL_8(L,o,g,o,T,y,p,e);
2868 const XMLCh Logo::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2869 const XMLCh Logo::HEIGHT_ATTRIB_NAME[] = UNICODE_LITERAL_6(h,e,i,g,h,t);
2870 const XMLCh Logo::WIDTH_ATTRIB_NAME[] = UNICODE_LITERAL_5(w,i,d,t,h);
2871 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2872 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);
2873 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2874 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2875 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2876 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2877 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);
2878 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2879 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);
2880 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2881 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2882 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2883 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);
2884 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2885 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2886 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);
2887 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);
2888 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2889 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);
2890 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);
2891 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);
2892 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);
2893 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2894 const XMLCh RequestInitiator::LOCAL_NAME[] = UNICODE_LITERAL_16(R,e,q,u,e,s,t,I,n,i,t,i,a,t,o,r);
2895 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2896 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2897 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);
2898 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2899 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);
2900 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2901 const XMLCh SigningMethod::LOCAL_NAME[] = UNICODE_LITERAL_13(S,i,g,n,i,n,g,M,e,t,h,o,d);
2902 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);
2903 const XMLCh SigningMethod::ALGORITHM_ATTRIB_NAME[] = UNICODE_LITERAL_9(A,l,g,o,r,i,t,h,m);
2904 const XMLCh SigningMethod::MINKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,i,n,K,e,y,S,i,z,e);
2905 const XMLCh SigningMethod::MAXKEYSIZE_ATTRIB_NAME[] = UNICODE_LITERAL_10(M,a,x,K,e,y,S,i,z,e);
2906 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);
2907 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);
2908 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2909 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2910 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);
2911 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);
2912 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);
2913 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2914 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);
2915 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2916 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2917 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
2918 const XMLCh UIInfo::LOCAL_NAME[] = UNICODE_LITERAL_6(U,I,I,n,f,o);
2919 const XMLCh UIInfo::TYPE_NAME[] = UNICODE_LITERAL_10(U,I,I,n,f,o,T,y,p,e);