use JSON instead of DDF marshalling
[mech_eap.orig] / util_shib.h
index f9ede20..7cacd66 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
@@ -76,9 +76,11 @@ 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,
+                           json_t *obj);
+    json_t *jsonRepresentation(void) const;
 
     static bool init(void);
     static void finalize(void);
@@ -87,6 +89,10 @@ public:
 
     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);
@@ -96,10 +102,6 @@ private:
     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