comment out dumping code
[mech_eap.orig] / util_shib.h
index 6189360..7fc9e6d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * SUCH DAMAGE.
  */
 
+/*
+ * Local attribute provider.
+ */
+
 #ifndef _UTIL_SHIB_H_
 #define _UTIL_SHIB_H_ 1
 
@@ -72,28 +76,32 @@ public:
     void releaseAnyNameMapping(gss_buffer_t type_id,
                                gss_any_t input) const;
 
-    void exportToBuffer(gss_buffer_t buffer) const;
-    bool initFromBuffer(const gss_eap_attr_ctx *ctx,
-                        const gss_buffer_t buffer);
+    const char *prefix(void) const;
+    const char *name(void) const;
+    bool initWithJsonObject(const gss_eap_attr_ctx *manager,
+                            JSONObject &obj);
+    JSONObject jsonRepresentation(void) const;
 
     static bool init(void);
     static void finalize(void);
 
+    OM_uint32 mapException(OM_uint32 *minor, std::exception &e) const;
+
     static gss_eap_attr_provider *createAttrContext(void);
 
+    std::vector<shibsp::Attribute *> getAttributes(void) const {
+        return m_attributes;
+    }
+
 private:
     static shibsp::Attribute *
         duplicateAttribute(const shibsp::Attribute *src);
     static std::vector <shibsp::Attribute *>
         duplicateAttributes(const std::vector <shibsp::Attribute *>src);
 
-    int getAttributeIndex(const gss_buffer_t attr) const;
+    ssize_t getAttributeIndex(const gss_buffer_t attr) const;
     const shibsp::Attribute *getAttribute(const gss_buffer_t attr) const;
 
-    std::vector<shibsp::Attribute *> getAttributes(void) const {
-        return m_attributes;
-    }
-
     bool authenticated(void) const { return m_authenticated; }
 
     friend bool