Merge branch 'master' of ssh://moonshot.suchdamage.org:822/srv/git/moonshot
[mech_eap.git] / util_saml.h
index 7c457e8..6be1c08 100644 (file)
  * SUCH DAMAGE.
  */
 
+/*
+ * SAML attribute provider.
+ */
+
 #ifndef _UTIL_SAML_H_
 #define _UTIL_SAML_H_ 1
 
@@ -74,7 +78,9 @@ public:
     bool initFromBuffer(const gss_eap_attr_ctx *ctx,
                         const gss_buffer_t buffer);
 
-    const opensaml::saml2::Assertion *getAssertion(void) const {
+    opensaml::saml2::Assertion *initAssertion(void);
+
+    opensaml::saml2::Assertion *getAssertion(void) const {
         return m_assertion;
     }
     bool authenticated(void) const {
@@ -131,7 +137,8 @@ public:
                       int *complete,
                       const opensaml::saml2::Attribute **pAttribute) const;
     bool getAssertion(int *authenticated,
-                      const opensaml::saml2::Assertion **pAssertion) const;
+                      opensaml::saml2::Assertion **pAssertion,
+                      bool createIfAbsent = false) const;
 
     static bool init(void);
     static void finalize(void);