/*
- * 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
+#ifdef __cplusplus
+
namespace opensaml {
namespace saml2 {
class Attribute;
const gss_ctx_id_t ctx);
bool getAttributeTypes(gss_eap_attr_enumeration_cb, void *data) const;
- void setAttribute(int complete,
+ bool setAttribute(int complete,
const gss_buffer_t attr,
const gss_buffer_t value);
- void deleteAttribute(const gss_buffer_t value);
+ bool deleteAttribute(const gss_buffer_t value);
bool getAttribute(const gss_buffer_t attr,
int *authenticated,
int *complete,
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 {
}
time_t getExpiryTime(void) const;
+ OM_uint32 mapException(OM_uint32 *minor, std::exception &e) const;
- static bool init();
- static void finalize();
+ static bool init(void);
+ static void finalize(void);
static gss_eap_attr_provider *createAttrContext(void);
~gss_eap_saml_attr_provider(void) {}
bool getAttributeTypes(gss_eap_attr_enumeration_cb, void *data) const;
- void setAttribute(int complete,
+ bool setAttribute(int complete,
const gss_buffer_t attr,
const gss_buffer_t value);
- void deleteAttribute(const gss_buffer_t value);
+ bool deleteAttribute(const gss_buffer_t value);
bool getAttribute(const gss_buffer_t attr,
int *authenticated,
int *complete,
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();
- static void finalize();
+ static bool init(void);
+ static void finalize(void);
static gss_eap_attr_provider *createAttrContext(void);
private:
};
+extern "C" {
+#endif
+
+OM_uint32 gssEapSamlAttrProvidersInit(OM_uint32 *minor);
+OM_uint32 gssEapSamlAttrProvidersFinalize(OM_uint32 *minor);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _UTIL_SAML_H_ */