Imported Upstream version 2.4+dfsg
[shibboleth/sp.git] / shibsp / attribute / AttributeDecoder.h
index a4ffd04..03b7485 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2009 Internet2
+ *  Copyright 2001-2010 Internet2
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@ namespace shibsp {
         bool m_internal;
 
         /** Hash algorithm to apply to decoded values. */
-        xmltooling::auto_ptr_char m_hashAlg;
+        std::string m_hashAlg;
 
         /**
          * Helper method to handle base class decoding housekeeping.
@@ -78,13 +78,13 @@ namespace shibsp {
          * @param xmlObject         XMLObject to decode
          * @param assertingParty    name of the party asserting the attribute
          * @param relyingParty      name of the party relying on the attribute
-         * @return a resolved Attribute, or NULL
+         * @return a resolved Attribute, or nullptr
          */
         virtual Attribute* decode(
             const std::vector<std::string>& ids,
             const xmltooling::XMLObject* xmlObject,
-            const char* assertingParty=NULL,
-            const char* relyingParty=NULL
+            const char* assertingParty=nullptr,
+            const char* relyingParty=nullptr
             ) const=0;
     };
 
@@ -110,6 +110,9 @@ namespace shibsp {
     /** Decodes arbitrary XML into an XMLAttribute. */
     extern SHIBSP_API xmltooling::QName XMLAttributeDecoderType;
 
+    /** Decodes base64-encoded data into a SimpleAttribute. */
+    extern SHIBSP_API xmltooling::QName Base64AttributeDecoderType;
+
     /** Registers built-in AttributeDecoders into the runtime. */
     void registerAttributeDecoders();
 };