Copied over mapping and filtering schemas.
[shibboleth/sp.git] / shibsp / attribute / StringAttributeDecoder.cpp
similarity index 86%
rename from shibsp/attribute/SimpleAttributeDecoder.cpp
rename to shibsp/attribute/StringAttributeDecoder.cpp
index 1bcf8e6..4e0bcfb 100644 (file)
@@ -15,7 +15,7 @@
  */\r
 \r
 /**\r
- * SimpleAttributeDecoder.cpp\r
+ * StringAttributeDecoder.cpp\r
  * \r
  * Decodes SAML into SimpleAttributes\r
  */\r
@@ -36,29 +36,30 @@ using namespace log4cpp;
 using namespace std;\r
 \r
 namespace shibsp {\r
-    class SHIBSP_DLLLOCAL SimpleAttributeDecoder : virtual public AttributeDecoder\r
+    class SHIBSP_DLLLOCAL StringAttributeDecoder : virtual public AttributeDecoder\r
     {\r
     public:\r
-        SimpleAttributeDecoder(const DOMElement* e) {}\r
-        ~SimpleAttributeDecoder() {}\r
+        StringAttributeDecoder(const DOMElement* e) : AttributeDecoder(e) {}\r
+        ~StringAttributeDecoder() {}\r
 \r
         shibsp::Attribute* decode(\r
             const char* id, const XMLObject* xmlObject, const char* assertingParty=NULL, const char* relyingParty=NULL\r
             ) const;\r
     };\r
 \r
-    AttributeDecoder* SHIBSP_DLLLOCAL SimpleAttributeDecoderFactory(const DOMElement* const & e)\r
+    AttributeDecoder* SHIBSP_DLLLOCAL StringAttributeDecoderFactory(const DOMElement* const & e)\r
     {\r
-        return new SimpleAttributeDecoder(e);\r
+        return new StringAttributeDecoder(e);\r
     }\r
 };\r
 \r
-shibsp::Attribute* SimpleAttributeDecoder::decode(\r
+shibsp::Attribute* StringAttributeDecoder::decode(\r
     const char* id, const XMLObject* xmlObject, const char* assertingParty, const char* relyingParty\r
     ) const\r
 {\r
     char* val;\r
     auto_ptr<SimpleAttribute> simple(new SimpleAttribute(id));\r
+    simple->setCaseSensitive(m_caseSensitive);\r
     vector<string>& dest = simple->getValues();\r
     vector<XMLObject*>::const_iterator v,stop;\r
 \r
@@ -87,7 +88,7 @@ shibsp::Attribute* SimpleAttributeDecoder::decode(
                 }\r
             }\r
             else {\r
-                log.warn("XMLObject type not recognized by SimpleAttributeDecoder, no values returned");\r
+                log.warn("XMLObject type not recognized by StringAttributeDecoder, no values returned");\r
                 return NULL;\r
             }\r
         }\r
@@ -127,7 +128,7 @@ shibsp::Attribute* SimpleAttributeDecoder::decode(
             val = toUTF8(saml1name->getName());\r
         }\r
         else {\r
-            log.warn("XMLObject type not recognized by SimpleAttributeDecoder, no values returned");\r
+            log.warn("XMLObject type not recognized by StringAttributeDecoder, no values returned");\r
             return NULL;\r
         }\r
     }\r