use JSON instead of DDF marshalling
[mech_eap.git] / util_saml.h
index 6be1c08..0a14d3e 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
@@ -74,9 +74,15 @@ 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 { return NULL; }
+    bool initWithJsonObject(const gss_eap_attr_ctx *manager GSSEAP_UNUSED,
+                           json_t *object GSSEAP_UNUSED) {
+        return false;
+    }
+    json_t *jsonRepresentation(void) const {
+        return NULL;
+    }
 
     opensaml::saml2::Assertion *initAssertion(void);
 
@@ -88,6 +94,7 @@ public:
     }
 
     time_t getExpiryTime(void) const;
+    OM_uint32 mapException(OM_uint32 *minor, std::exception &e) const;
 
     static bool init(void);
     static void finalize(void);
@@ -128,9 +135,17 @@ 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 {
+        return NULL;
+    }
+    bool initWithJsonObject(const gss_eap_attr_ctx *manager GSSEAP_UNUSED,
+                           json_t *object GSSEAP_UNUSED) {
+        return false;
+    }
+    json_t *jsonRepresentation(void) const {
+        return NULL;
+    }
 
     bool getAttribute(const gss_buffer_t attr,
                       int *authenticated,