X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fsaml2%2Fmetadata%2Fimpl%2FMetadataImpl.cpp;h=f8eab77b822ce924f998ba477e2e3ccffb8a490f;hb=5263186a620ca02913980ad2d35d4045844e7a05;hp=9a86aabade129c561a580a829025967550a9f616;hpb=fe73576ec05a91b1133a2349c8224414a9fc6416;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/saml2/metadata/impl/MetadataImpl.cpp b/saml/saml2/metadata/impl/MetadataImpl.cpp index 9a86aab..f8eab77 100644 --- a/saml/saml2/metadata/impl/MetadataImpl.cpp +++ b/saml/saml2/metadata/impl/MetadataImpl.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -62,11 +61,13 @@ namespace opensaml { DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName); DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber); + DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace); + DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID); + class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType, public AbstractSimpleElement, public AbstractChildlessElement, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -90,8 +91,7 @@ namespace opensaml { } localizedNameTypeImpl(const localizedNameTypeImpl& src) - : AbstractXMLObject(src), AbstractSimpleElement(src), - AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) { init(); setLang(src.getLang()); } @@ -115,7 +115,6 @@ namespace opensaml { public AbstractSimpleElement, public AbstractChildlessElement, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -139,8 +138,7 @@ namespace opensaml { } localizedURITypeImpl(const localizedURITypeImpl& src) - : AbstractXMLObject(src), AbstractSimpleElement(src), - AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) { init(); setLang(src.getLang()); } @@ -241,9 +239,8 @@ namespace opensaml { }; class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions, - public AbstractDOMCachingXMLObject, public AbstractElementProxy, - public AbstractValidatingXMLObject, + public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -255,8 +252,7 @@ namespace opensaml { } ExtensionsImpl(const ExtensionsImpl& src) - : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractElementProxy(src), - AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) { for (list::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) { if (*i) { getXMLObjects().push_back((*i)->clone()); @@ -283,7 +279,6 @@ namespace opensaml { public AbstractComplexElement, public AbstractAttributeExtensibleXMLObject, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -310,10 +305,7 @@ namespace opensaml { } OrganizationImpl(const OrganizationImpl& src) - : AbstractXMLObject(src), - AbstractAttributeExtensibleXMLObject(src), - AbstractDOMCachingXMLObject(src), - AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); if (src.getExtensions()) setExtensions(src.getExtensions()->cloneExtensions()); @@ -345,14 +337,7 @@ namespace opensaml { protected: void marshallAttributes(DOMElement* domElement) const { - // Take care of wildcard. - for (map::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) { - DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart()); - if (i->first.hasPrefix()) - attr->setPrefix(i->first.getPrefix()); - attr->setNodeValue(i->second); - domElement->setAttributeNode(attr); - } + marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { @@ -364,8 +349,7 @@ namespace opensaml { } void processAttribute(const DOMAttr* attribute) { - QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix()); - setAttribute(q,attribute->getNodeValue()); + unmarshallExtensionAttribute(attribute); } }; @@ -373,7 +357,6 @@ namespace opensaml { public AbstractComplexElement, public AbstractAttributeExtensibleXMLObject, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -409,10 +392,7 @@ namespace opensaml { } ContactPersonImpl(const ContactPersonImpl& src) - : AbstractXMLObject(src), - AbstractAttributeExtensibleXMLObject(src), - AbstractDOMCachingXMLObject(src), - AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); if (src.getExtensions()) setExtensions(src.getExtensions()->cloneExtensions()); @@ -446,28 +426,20 @@ namespace opensaml { IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber); IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) { setContactType(value); return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL); - - // Take care of wildcard. - for (map::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) { - DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart()); - if (i->first.hasPrefix()) - attr->setPrefix(i->first.getPrefix()); - attr->setNodeValue(i->second); - domElement->setAttributeNode(attr); - } + marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { @@ -481,8 +453,7 @@ namespace opensaml { } void processAttribute(const DOMAttr* attribute) { - QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix()); - setAttribute(q,attribute->getNodeValue()); + unmarshallExtensionAttribute(attribute); } }; @@ -490,7 +461,6 @@ namespace opensaml { public AbstractSimpleElement, public AbstractChildlessElement, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -509,8 +479,7 @@ namespace opensaml { } AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src) - : AbstractXMLObject(src), AbstractSimpleElement(src), - AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) { init(); } @@ -532,7 +501,6 @@ namespace opensaml { class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor, public AbstractComplexElement, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -552,8 +520,7 @@ namespace opensaml { init(); } - KeyDescriptorImpl(const KeyDescriptorImpl& src) - : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + KeyDescriptorImpl(const KeyDescriptorImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); setUse(src.getUse()); if (src.getKeyInfo()) @@ -578,7 +545,7 @@ namespace opensaml { void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false); - PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,XMLConstants::XMLENC_NS,false); + PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAMLConstants::SAML20MD_NS,false); AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } @@ -589,10 +556,9 @@ namespace opensaml { }; class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType, - public AbstractDOMCachingXMLObject, public AbstractElementProxy, public AbstractAttributeExtensibleXMLObject, - public AbstractValidatingXMLObject, + public AbstractDOMCachingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -617,11 +583,8 @@ namespace opensaml { } EndpointTypeImpl(const EndpointTypeImpl& src) - : AbstractXMLObject(src), - AbstractDOMCachingXMLObject(src), - AbstractElementProxy(src), - AbstractAttributeExtensibleXMLObject(src), - AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractElementProxy(src), + AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) { setBinding(src.getBinding()); setLocation(src.getLocation()); setResponseLocation(src.getResponseLocation()); @@ -637,7 +600,7 @@ namespace opensaml { IMPL_STRING_ATTRIB(Location); IMPL_STRING_ATTRIB(ResponseLocation); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) { setBinding(value); @@ -652,22 +615,14 @@ namespace opensaml { return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: void marshallAttributes(DOMElement* domElement) const { MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL); MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL); MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL); - - // Take care of wildcard. - for (map::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) { - DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart()); - if (i->first.hasPrefix()) - attr->setPrefix(i->first.getPrefix()); - attr->setNodeValue(i->second); - domElement->setAttributeNode(attr); - } + marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { @@ -677,13 +632,11 @@ namespace opensaml { getXMLObjects().push_back(childXMLObject); return; } - AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root); } void processAttribute(const DOMAttr* attribute) { - QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix()); - setAttribute(q,attribute->getNodeValue()); + unmarshallExtensionAttribute(attribute); } }; @@ -719,7 +672,7 @@ namespace opensaml { IMPL_INTEGER_ATTRIB(Index); IMPL_BOOLEAN_ATTRIB(isDefault); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) { setIndex(value); @@ -730,7 +683,7 @@ namespace opensaml { return; } } - EndpointTypeImpl::setAttribute(qualifiedName, value); + EndpointTypeImpl::setAttribute(qualifiedName, value, ID); } protected: @@ -912,7 +865,6 @@ namespace opensaml { public AbstractComplexElement, public AbstractAttributeExtensibleXMLObject, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -957,10 +909,7 @@ namespace opensaml { } RoleDescriptorImpl(const RoleDescriptorImpl& src) - : AbstractXMLObject(src), - AbstractAttributeExtensibleXMLObject(src), - AbstractDOMCachingXMLObject(src), - AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); setID(src.getID()); setProtocolSupportEnumeration(src.getProtocolSupportEnumeration()); @@ -988,10 +937,6 @@ namespace opensaml { } } - const XMLCh* getId() const { - return getID(); - } - //IMPL_TYPED_CHILD(Signature); // Need customized setter. protected: @@ -1010,17 +955,49 @@ namespace opensaml { m_Signature->setContentReference(new opensaml::ContentReference(*this)); } - IMPL_STRING_ATTRIB(ID); + IMPL_ID_ATTRIB(ID); IMPL_STRING_ATTRIB(ProtocolSupportEnumeration); IMPL_STRING_ATTRIB(ErrorURL); - IMPL_DATETIME_ATTRIB(ValidUntil); - IMPL_DATETIME_ATTRIB(CacheDuration); + IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX); + IMPL_DATETIME_ATTRIB(CacheDuration,0); IMPL_TYPED_CHILD(Extensions); IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization); IMPL_TYPED_CHILD(Organization); IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson); + + bool hasSupport(const XMLCh* protocol) const { + if (m_ProtocolSupportEnumeration) { + // Look for first character. + unsigned int len=XMLString::stringLen(protocol); + unsigned int pos=0; + int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos); + while (index>=0) { + // Only possible match is if it's the first character or a space comes before it. + if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) { + // See if rest of protocol string is present. + if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) { + // Only possible match is if it's the last character or a space comes after it. + if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace) + return true; + else + pos=index+len; + } + else { + // Move past last search and start again. + pos=index+1; + } + } + else { + // Move past last search and start again. + pos=index+1; + } + index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos); + } + } + return false; + } - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) { setID(value); @@ -1043,7 +1020,7 @@ namespace opensaml { return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: @@ -1053,15 +1030,7 @@ namespace opensaml { MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL); MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL); MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL); - - // Take care of wildcard. - for (map::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) { - DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart()); - if (i->first.hasPrefix()) - attr->setPrefix(i->first.getPrefix()); - attr->setNodeValue(i->second); - domElement->setAttributeNode(attr); - } + marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { @@ -1075,8 +1044,7 @@ namespace opensaml { void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(ID,ID,NULL); - QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix()); - setAttribute(q,attribute->getNodeValue()); + unmarshallExtensionAttribute(attribute); } }; @@ -1239,14 +1207,14 @@ namespace opensaml { IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile); IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) { setWantAuthnRequestsSigned(value); return; } } - RoleDescriptorImpl::setAttribute(qualifiedName, value); + RoleDescriptorImpl::setAttribute(qualifiedName, value, ID); } protected: @@ -1269,7 +1237,6 @@ namespace opensaml { public AbstractComplexElement, public AbstractAttributeExtensibleXMLObject, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -1290,10 +1257,7 @@ namespace opensaml { } RequestedAttributeImpl(const RequestedAttributeImpl& src) - : AbstractXMLObject(src), - AbstractAttributeExtensibleXMLObject(src), - AbstractDOMCachingXMLObject(src), - AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); setName(src.getName()); setNameFormat(src.getNameFormat()); @@ -1318,7 +1282,7 @@ namespace opensaml { IMPL_BOOLEAN_ATTRIB(isRequired); IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) { setName(value); @@ -1337,7 +1301,7 @@ namespace opensaml { return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: @@ -1346,15 +1310,7 @@ namespace opensaml { MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL); MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL); MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL); - - // Take care of wildcard. - for (map::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) { - DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart()); - if (i->first.hasPrefix()) - attr->setPrefix(i->first.getPrefix()); - attr->setNodeValue(i->second); - domElement->setAttributeNode(attr); - } + marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { @@ -1362,15 +1318,13 @@ namespace opensaml { } void processAttribute(const DOMAttr* attribute) { - QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix()); - setAttribute(q,attribute->getNodeValue()); + unmarshallExtensionAttribute(attribute); } }; class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService, public AbstractComplexElement, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -1398,7 +1352,7 @@ namespace opensaml { } AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src) - : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); setIndex(src.m_Index); isDefault(src.m_isDefault); @@ -1500,7 +1454,7 @@ namespace opensaml { IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService); IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) { setAuthnRequestsSigned(value); @@ -1511,7 +1465,7 @@ namespace opensaml { return; } } - RoleDescriptorImpl::setAttribute(qualifiedName, value); + RoleDescriptorImpl::setAttribute(qualifiedName, value, ID); } protected: @@ -1738,12 +1692,160 @@ namespace opensaml { } }; + class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl + { + void init() { + m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL; + m_children.push_back(NULL); + m_pos_NameIDFormat=m_pos_ContactPerson; + ++m_pos_NameIDFormat; + } + + protected: + list::iterator m_pos_NameIDFormat; + + QueryDescriptorTypeImpl() { + init(); + } + + public: + virtual ~QueryDescriptorTypeImpl() {} + + QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) { + init(); + } + + QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) { + init(); + WantAssertionsSigned(src.m_WantAssertionsSigned); + VectorOf(NameIDFormat) y=getNameIDFormats(); + for (vector::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) { + if (*m) { + y.push_back((*m)->cloneNameIDFormat()); + } + } + } + + IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned); + IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat); + + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { + if (!qualifiedName.hasNamespaceURI()) { + if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) { + setWantAssertionsSigned(value); + return; + } + } + RoleDescriptorImpl::setAttribute(qualifiedName, value, ID); + } + + protected: + void marshallAttributes(DOMElement* domElement) const { + MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL); + RoleDescriptorImpl::marshallAttributes(domElement); + } + + void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { + PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false); + RoleDescriptorImpl::processChildElement(childXMLObject,root); + } + }; + + class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl + { + public: + virtual ~AuthnQueryDescriptorTypeImpl() {} + + AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) {} + + AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {} + + IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType); + QueryDescriptorType* cloneQueryDescriptorType() const { + return new AuthnQueryDescriptorTypeImpl(*this); + } + RoleDescriptor* cloneRoleDescriptor() const { + return new AuthnQueryDescriptorTypeImpl(*this); + } + }; + + class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl + { + public: + virtual ~AttributeQueryDescriptorTypeImpl() {} + + AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) {} + + AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src) + : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) { + VectorOf(AttributeConsumingService) w=getAttributeConsumingServices(); + for (vector::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) { + if (*j) { + w.push_back((*j)->cloneAttributeConsumingService()); + } + } + } + + IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType); + QueryDescriptorType* cloneQueryDescriptorType() const { + return new AttributeQueryDescriptorTypeImpl(*this); + } + RoleDescriptor* cloneRoleDescriptor() const { + return new AttributeQueryDescriptorTypeImpl(*this); + } + + IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end()); + + protected: + void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { + PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false); + QueryDescriptorTypeImpl::processChildElement(childXMLObject,root); + } + }; + + class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl + { + public: + virtual ~AuthzDecisionQueryDescriptorTypeImpl() {} + + AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) + : AbstractXMLObject(nsURI, localName, prefix, schemaType) {} + + AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src) + : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) { + VectorOf(ActionNamespace) w=getActionNamespaces(); + for (vector::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) { + if (*j) { + w.push_back((*j)->cloneActionNamespace()); + } + } + } + + IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType); + QueryDescriptorType* cloneQueryDescriptorType() const { + return new AuthzDecisionQueryDescriptorTypeImpl(*this); + } + RoleDescriptor* cloneRoleDescriptor() const { + return new AuthzDecisionQueryDescriptorTypeImpl(*this); + } + + IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end()); + + protected: + void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { + PROC_TYPED_CHILDREN(ActionNamespace,SAMLConstants::SAML20MD_QUERY_EXT_NS,false); + QueryDescriptorTypeImpl::processChildElement(childXMLObject,root); + } + }; + class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor, public virtual SignableObject, public AbstractComplexElement, public AbstractAttributeExtensibleXMLObject, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -1778,10 +1880,7 @@ namespace opensaml { } AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src) - : AbstractXMLObject(src), - AbstractAttributeExtensibleXMLObject(src), - AbstractDOMCachingXMLObject(src), - AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); setID(src.getID()); setAffiliationOwnerID(src.getAffiliationOwnerID()); @@ -1808,10 +1907,6 @@ namespace opensaml { IMPL_XMLOBJECT_CLONE(AffiliationDescriptor); - const XMLCh* getId() const { - return getID(); - } - //IMPL_TYPED_CHILD(Signature); // Need customized setter. protected: @@ -1830,15 +1925,15 @@ namespace opensaml { m_Signature->setContentReference(new opensaml::ContentReference(*this)); } - IMPL_STRING_ATTRIB(ID); + IMPL_ID_ATTRIB(ID); IMPL_STRING_ATTRIB(AffiliationOwnerID); - IMPL_DATETIME_ATTRIB(ValidUntil); - IMPL_DATETIME_ATTRIB(CacheDuration); + IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX); + IMPL_DATETIME_ATTRIB(CacheDuration,0); IMPL_TYPED_CHILD(Extensions); IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember); IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) { setID(value); @@ -1857,7 +1952,7 @@ namespace opensaml { return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); } protected: @@ -1866,15 +1961,7 @@ namespace opensaml { MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL); MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL); MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL); - - // Take care of wildcard. - for (map::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) { - DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart()); - if (i->first.hasPrefix()) - attr->setPrefix(i->first.getPrefix()); - attr->setNodeValue(i->second); - domElement->setAttributeNode(attr); - } + marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { @@ -1887,8 +1974,7 @@ namespace opensaml { void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(ID,ID,NULL); - QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix()); - setAttribute(q,attribute->getNodeValue()); + unmarshallExtensionAttribute(attribute); } }; @@ -1897,7 +1983,6 @@ namespace opensaml { public AbstractComplexElement, public AbstractAttributeExtensibleXMLObject, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -1940,10 +2025,7 @@ namespace opensaml { } EntityDescriptorImpl(const EntityDescriptorImpl& src) - : AbstractXMLObject(src), - AbstractAttributeExtensibleXMLObject(src), - AbstractDOMCachingXMLObject(src), - AbstractValidatingXMLObject(src) { + : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); setID(src.getID()); setEntityID(src.getEntityID()); @@ -1990,6 +2072,24 @@ namespace opensaml { continue; } + AuthnQueryDescriptorType* authnq=dynamic_cast(*i); + if (authnq) { + getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType()); + continue; + } + + AttributeQueryDescriptorType* attrq=dynamic_cast(*i); + if (attrq) { + getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType()); + continue; + } + + AuthzDecisionQueryDescriptorType* authzq=dynamic_cast(*i); + if (authzq) { + getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType()); + continue; + } + RoleDescriptor* role=dynamic_cast(*i); if (role) { getRoleDescriptors().push_back(role->cloneRoleDescriptor()); @@ -2014,10 +2114,6 @@ namespace opensaml { IMPL_XMLOBJECT_CLONE(EntityDescriptor); - const XMLCh* getId() const { - return getID(); - } - //IMPL_TYPED_CHILD(Signature); // Need customized setter. protected: @@ -2036,10 +2132,10 @@ namespace opensaml { m_Signature->setContentReference(new opensaml::ContentReference(*this)); } - IMPL_STRING_ATTRIB(ID); + IMPL_ID_ATTRIB(ID); IMPL_STRING_ATTRIB(EntityID); - IMPL_DATETIME_ATTRIB(ValidUntil); - IMPL_DATETIME_ATTRIB(CacheDuration); + IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX); + IMPL_DATETIME_ATTRIB(CacheDuration,0); IMPL_TYPED_CHILD(Extensions); IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor); IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor); @@ -2047,12 +2143,15 @@ namespace opensaml { IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor); IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor); IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor); + IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor); + IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor); + IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor); IMPL_TYPED_CHILD(AffiliationDescriptor); IMPL_TYPED_CHILD(Organization); IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson); IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value) { + void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) { if (!qualifiedName.hasNamespaceURI()) { if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) { setID(value); @@ -2071,7 +2170,108 @@ namespace opensaml { return; } } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value); + AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); + } + + const IDPSSODescriptor* getIDPSSODescriptor(const XMLCh* protocol) const { + for (vector::const_iterator i=m_IDPSSODescriptors.begin(); i!=m_IDPSSODescriptors.end(); i++) { + if ((*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; + } + + const SPSSODescriptor* getSPSSODescriptor(const XMLCh* protocol) const { + for (vector::const_iterator i=m_SPSSODescriptors.begin(); i!=m_SPSSODescriptors.end(); i++) { + if ((*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; + } + + const AuthnAuthorityDescriptor* getAuthnAuthorityDescriptor(const XMLCh* protocol) const { + for (vector::const_iterator i=m_AuthnAuthorityDescriptors.begin(); i!=m_AuthnAuthorityDescriptors.end(); i++) { + if ((*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; + } + + const AttributeAuthorityDescriptor* getAttributeAuthorityDescriptor(const XMLCh* protocol) const { + for (vector::const_iterator i=m_AttributeAuthorityDescriptors.begin(); i!=m_AttributeAuthorityDescriptors.end(); i++) { + if ((*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; + } + + const PDPDescriptor* getPDPDescriptor(const XMLCh* protocol) const { + for (vector::const_iterator i=m_PDPDescriptors.begin(); i!=m_PDPDescriptors.end(); i++) { + if ((*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; + } + + const AuthnQueryDescriptorType* getAuthnQueryDescriptorType(const XMLCh* protocol) const { + for (vector::const_iterator i=m_AuthnQueryDescriptorTypes.begin(); i!=m_AuthnQueryDescriptorTypes.end(); i++) { + if ((*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; + } + + const AttributeQueryDescriptorType* getAttributeQueryDescriptorType(const XMLCh* protocol) const { + for (vector::const_iterator i=m_AttributeQueryDescriptorTypes.begin(); i!=m_AttributeQueryDescriptorTypes.end(); i++) { + if ((*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; + } + + const AuthzDecisionQueryDescriptorType* getAuthzDecisionQueryDescriptorType(const XMLCh* protocol) const { + for (vector::const_iterator i=m_AuthzDecisionQueryDescriptorTypes.begin(); i!=m_AuthzDecisionQueryDescriptorTypes.end(); i++) { + if ((*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; + } + + const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const { + // Check for "known" elements/types. + QName q; + q.setNamespaceURI(SAMLConstants::SAML20MD_NS); + q.setLocalPart(IDPSSODescriptor::LOCAL_NAME); + if (q == qname) + return getIDPSSODescriptor(protocol); + q.setLocalPart(SPSSODescriptor::LOCAL_NAME); + if (q == qname) + return getSPSSODescriptor(protocol); + q.setLocalPart(AuthnAuthorityDescriptor::LOCAL_NAME); + if (q == qname) + return getAuthnAuthorityDescriptor(protocol); + q.setLocalPart(AttributeAuthorityDescriptor::LOCAL_NAME); + if (q == qname) + return getAttributeAuthorityDescriptor(protocol); + q.setLocalPart(PDPDescriptor::LOCAL_NAME); + if (q == qname) + return getPDPDescriptor(protocol); + q.setNamespaceURI(SAMLConstants::SAML20MD_QUERY_EXT_NS); + q.setLocalPart(AuthnQueryDescriptorType::TYPE_NAME); + if (q == qname) + return getAuthnQueryDescriptorType(protocol); + q.setLocalPart(AttributeQueryDescriptorType::TYPE_NAME); + if (q == qname) + return getAttributeQueryDescriptorType(protocol); + q.setLocalPart(AuthzDecisionQueryDescriptorType::TYPE_NAME); + if (q == qname) + return getAuthzDecisionQueryDescriptorType(protocol); + + for (vector::const_iterator i=m_RoleDescriptors.begin(); i!=m_RoleDescriptors.end(); i++) { + if ((*i)->getSchemaType() && qname==(*((*i)->getSchemaType())) && (*i)->hasSupport(protocol) && (*i)->isValid()) + return (*i); + } + return NULL; } protected: @@ -2080,26 +2280,21 @@ namespace opensaml { MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL); MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL); MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL); - - // Take care of wildcard. - for (map::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) { - DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart()); - if (i->first.hasPrefix()) - attr->setPrefix(i->first.getPrefix()); - attr->setNodeValue(i->second); - domElement->setAttributeNode(attr); - } + marshallExtensionAttributes(domElement); } void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false); PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false); - PROC_TYPED_CHILDREN(RoleDescriptor,SAMLConstants::SAML20MD_NS,false); PROC_TYPED_CHILDREN(IDPSSODescriptor,SAMLConstants::SAML20MD_NS,false); PROC_TYPED_CHILDREN(SPSSODescriptor,SAMLConstants::SAML20MD_NS,false); PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false); PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false); PROC_TYPED_CHILDREN(PDPDescriptor,SAMLConstants::SAML20MD_NS,false); + PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false); + PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false); + PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false); + PROC_TYPED_CHILDREN(RoleDescriptor,SAMLConstants::SAML20MD_NS,false); PROC_TYPED_CHILD(AffiliationDescriptor,SAMLConstants::SAML20MD_NS,false); PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false); PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false); @@ -2109,8 +2304,7 @@ namespace opensaml { void processAttribute(const DOMAttr* attribute) { PROC_ID_ATTRIB(ID,ID,NULL); - QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix()); - setAttribute(q,attribute->getNodeValue()); + unmarshallExtensionAttribute(attribute); } }; @@ -2118,7 +2312,6 @@ namespace opensaml { public virtual SignableObject, public AbstractComplexElement, public AbstractDOMCachingXMLObject, - public AbstractValidatingXMLObject, public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { @@ -2147,10 +2340,7 @@ namespace opensaml { init(); } - EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src) - : AbstractXMLObject(src), - AbstractDOMCachingXMLObject(src), - AbstractValidatingXMLObject(src) { + EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) { init(); setID(src.getID()); setName(src.getName()); @@ -2180,10 +2370,6 @@ namespace opensaml { IMPL_XMLOBJECT_CLONE(EntitiesDescriptor); - const XMLCh* getId() const { - return getID(); - } - //IMPL_TYPED_CHILD(Signature); // Need customized setter. protected: @@ -2202,10 +2388,10 @@ namespace opensaml { m_Signature->setContentReference(new opensaml::ContentReference(*this)); } - IMPL_STRING_ATTRIB(ID); + IMPL_ID_ATTRIB(ID); IMPL_STRING_ATTRIB(Name); - IMPL_DATETIME_ATTRIB(ValidUntil); - IMPL_DATETIME_ATTRIB(CacheDuration); + IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX); + IMPL_DATETIME_ATTRIB(CacheDuration,0); IMPL_TYPED_CHILD(Extensions); IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end()); IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end()); @@ -2252,9 +2438,12 @@ IMPL_XMLOBJECTBUILDER(AssertionIDRequestService); IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor); IMPL_XMLOBJECTBUILDER(AttributeConsumingService); IMPL_XMLOBJECTBUILDER(AttributeProfile); +IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType); IMPL_XMLOBJECTBUILDER(AttributeService); IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor); +IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType); IMPL_XMLOBJECTBUILDER(AuthnQueryService); +IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType); IMPL_XMLOBJECTBUILDER(AuthzService); IMPL_XMLOBJECTBUILDER(Company); IMPL_XMLOBJECTBUILDER(ContactPerson); @@ -2286,6 +2475,10 @@ IMPL_XMLOBJECTBUILDER(SPSSODescriptor); IMPL_XMLOBJECTBUILDER(SurName); IMPL_XMLOBJECTBUILDER(TelephoneNumber); +IMPL_XMLOBJECTBUILDER(ActionNamespace); +IMPL_XMLOBJECTBUILDER(SourceID); + +const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e); 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); 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); const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e); @@ -2293,8 +2486,6 @@ const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f 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); 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); const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D); -const XMLCh AffiliationDescriptor::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l); -const XMLCh AffiliationDescriptor::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n); 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); 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); 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); @@ -2306,11 +2497,18 @@ const XMLCh AttributeConsumingService::TYPE_NAME[] = UNICODE_LITERAL_29(A,t,t const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x); const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t); const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e); +const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r); +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); const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e); 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); 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); +const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r); +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); 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); +const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r); +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); const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e); +const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n); const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y); const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n); const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e); @@ -2329,14 +2527,10 @@ const XMLCh EndpointType::RESPONSELOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_16(R 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); 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); const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D); -const XMLCh EntitiesDescriptor::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l); -const XMLCh EntitiesDescriptor::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n); const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e); const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r); 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); const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D); -const XMLCh EntityDescriptor::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l); -const XMLCh EntityDescriptor::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n); const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D); const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s); const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e); @@ -2369,19 +2563,21 @@ const XMLCh OrganizationDisplayName::LOCAL_NAME[] = UNICODE_LITERAL_23(O,r,g const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L); const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r); 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); +const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull}; +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); +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); 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); 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); const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d); const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r); const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D); -const XMLCh RoleDescriptor::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l); -const XMLCh RoleDescriptor::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n); 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); const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L); 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); const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e); 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); 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); +const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D); const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r); 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); 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); @@ -2390,3 +2586,4 @@ const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull}; 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); const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e); const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r); +const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);