X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2Fattribute%2FStringAttributeDecoder.cpp;fp=shibsp%2Fattribute%2FSimpleAttributeDecoder.cpp;h=4e0bcfb9a7ef20295fa9d7aa4470f889956baa62;hb=3031c89c1e9110c5da7710b5694ff863d29ae28c;hp=1bcf8e63fadcf068babc5d980766440357f45e49;hpb=b85fe8767c9727abe2bbf44722d73dbb6a9ad603;p=shibboleth%2Fsp.git diff --git a/shibsp/attribute/SimpleAttributeDecoder.cpp b/shibsp/attribute/StringAttributeDecoder.cpp similarity index 86% rename from shibsp/attribute/SimpleAttributeDecoder.cpp rename to shibsp/attribute/StringAttributeDecoder.cpp index 1bcf8e6..4e0bcfb 100644 --- a/shibsp/attribute/SimpleAttributeDecoder.cpp +++ b/shibsp/attribute/StringAttributeDecoder.cpp @@ -15,7 +15,7 @@ */ /** - * SimpleAttributeDecoder.cpp + * StringAttributeDecoder.cpp * * Decodes SAML into SimpleAttributes */ @@ -36,29 +36,30 @@ using namespace log4cpp; using namespace std; namespace shibsp { - class SHIBSP_DLLLOCAL SimpleAttributeDecoder : virtual public AttributeDecoder + class SHIBSP_DLLLOCAL StringAttributeDecoder : virtual public AttributeDecoder { public: - SimpleAttributeDecoder(const DOMElement* e) {} - ~SimpleAttributeDecoder() {} + StringAttributeDecoder(const DOMElement* e) : AttributeDecoder(e) {} + ~StringAttributeDecoder() {} shibsp::Attribute* decode( const char* id, const XMLObject* xmlObject, const char* assertingParty=NULL, const char* relyingParty=NULL ) const; }; - AttributeDecoder* SHIBSP_DLLLOCAL SimpleAttributeDecoderFactory(const DOMElement* const & e) + AttributeDecoder* SHIBSP_DLLLOCAL StringAttributeDecoderFactory(const DOMElement* const & e) { - return new SimpleAttributeDecoder(e); + return new StringAttributeDecoder(e); } }; -shibsp::Attribute* SimpleAttributeDecoder::decode( +shibsp::Attribute* StringAttributeDecoder::decode( const char* id, const XMLObject* xmlObject, const char* assertingParty, const char* relyingParty ) const { char* val; auto_ptr simple(new SimpleAttribute(id)); + simple->setCaseSensitive(m_caseSensitive); vector& dest = simple->getValues(); vector::const_iterator v,stop; @@ -87,7 +88,7 @@ shibsp::Attribute* SimpleAttributeDecoder::decode( } } else { - log.warn("XMLObject type not recognized by SimpleAttributeDecoder, no values returned"); + log.warn("XMLObject type not recognized by StringAttributeDecoder, no values returned"); return NULL; } } @@ -127,7 +128,7 @@ shibsp::Attribute* SimpleAttributeDecoder::decode( val = toUTF8(saml1name->getName()); } else { - log.warn("XMLObject type not recognized by SimpleAttributeDecoder, no values returned"); + log.warn("XMLObject type not recognized by StringAttributeDecoder, no values returned"); return NULL; } }