X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=blobdiff_plain;f=saml%2Fsaml2%2Fcore%2Fimpl%2FAssertions20Impl.cpp;h=00c90b40be3d2c5d557d2106997c46a08a6c4e06;hp=4dd9a095f7b006bc3d6bfc0c47fb934a32d63899;hb=435f0df97954469724ca7caa603e075be0ec76db;hpb=88fd73c5c117f708f09171375ae1890cb86bab8b diff --git a/saml/saml2/core/impl/Assertions20Impl.cpp b/saml/saml2/core/impl/Assertions20Impl.cpp index 4dd9a09..00c90b4 100644 --- a/saml/saml2/core/impl/Assertions20Impl.cpp +++ b/saml/saml2/core/impl/Assertions20Impl.cpp @@ -40,10 +40,13 @@ using namespace xmlencryption; using namespace xmlsignature; using namespace xmltooling; using namespace std; +using xmlconstants::XSI_NS; using xmlconstants::XMLSIG_NS; using xmlconstants::XMLENC_NS; +using xmlconstants::XML_BOOL_NULL; using samlconstants::SAML20_NS; + #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) @@ -413,10 +416,7 @@ namespace opensaml { } }; - class SAML_DLLLOCAL SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType, - public AbstractDOMCachingXMLObject, - public AbstractXMLObjectMarshaller, - public AbstractXMLObjectUnmarshaller + class SAML_DLLLOCAL SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType, public virtual AbstractXMLObject { void init() { m_NotBefore=m_NotOnOrAfter=NULL; @@ -442,7 +442,7 @@ namespace opensaml { init(); } - SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractDOMCachingXMLObject(src) { + SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractXMLObject(src) { init(); setNotBefore(src.getNotBefore()); setNotOnOrAfter(src.getNotOnOrAfter()); @@ -472,7 +472,6 @@ namespace opensaml { PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL); PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL); PROC_STRING_ATTRIB(Address,ADDRESS,NULL); - AbstractXMLObjectUnmarshaller::processAttribute(attribute); } }; @@ -526,12 +525,24 @@ namespace opensaml { SubjectConfirmationDataTypeImpl::marshallAttributes(domElement); AnyElementImpl::marshallAttributes(domElement); } + + void processAttribute(const DOMAttr* attribute) { + PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL); + PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL); + PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL); + PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL); + PROC_STRING_ATTRIB(Address,ADDRESS,NULL); + AnyElementImpl::processAttribute(attribute); + } }; class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType, public SubjectConfirmationDataTypeImpl, public AbstractComplexElement, - public AbstractAttributeExtensibleXMLObject + public AbstractAttributeExtensibleXMLObject, + public AbstractDOMCachingXMLObject, + public AbstractXMLObjectMarshaller, + public AbstractXMLObjectUnmarshaller { public: virtual ~KeyInfoConfirmationDataTypeImpl() {} @@ -542,7 +553,7 @@ namespace opensaml { KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src) : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src), - AbstractAttributeExtensibleXMLObject(src) { + AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) { VectorOf(KeyInfo) v=getKeyInfos(); for (vector::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i) v.push_back((*i)->cloneKeyInfo()); @@ -1084,7 +1095,6 @@ namespace opensaml { } }; - //TODO need unit test for this class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl { public: @@ -1581,7 +1591,7 @@ const XMLCh EncryptedAssertion::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y const XMLCh EncryptedAttribute::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,t,t,r,i,b,u,t,e); const XMLCh EncryptedElementType::LOCAL_NAME[] = {chNull}; const XMLCh EncryptedElementType::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,c,r,y,p,t,e,d,E,l,e,m,e,n,t,T,y,p,e); -const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,d); +const XMLCh EncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,D); const XMLCh Evidence::LOCAL_NAME[] = UNICODE_LITERAL_8(E,v,i,d,e,n,c,e); const XMLCh Evidence::TYPE_NAME[] = UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e); const XMLCh Issuer::LOCAL_NAME[] = UNICODE_LITERAL_6(I,s,s,u,e,r); @@ -1622,7 +1632,7 @@ const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-fo chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash, chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon, - chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull + chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chNull }; const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress @@ -1754,7 +1764,7 @@ const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-f chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon, chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash, chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon, - chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull + chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chNull }; const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri