Use anonymous name if we have not initiator identity
[mech_eap.orig] / util_saml.h
index 7c457e8..99be5b8 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.
  */
 
+/*
+ * 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 {
@@ -82,6 +88,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);
@@ -131,7 +138,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);