summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Clapies <nclapies@entrouvert.com>2004-04-27 17:20:36 +0000
committerNicolas Clapies <nclapies@entrouvert.com>2004-04-27 17:20:36 +0000
commit6f1ffb6de23ab0c05f0eb7d1b4119f73a58d8bd8 (patch)
treeafda82e1ce1da0d3a9ee105835cfc80dbb466ea3
parent22e74ede81046574292d305a1bc1f123491c36d0 (diff)
downloadlasso-6f1ffb6de23ab0c05f0eb7d1b4119f73a58d8bd8.tar.gz
lasso-6f1ffb6de23ab0c05f0eb7d1b4119f73a58d8bd8.tar.xz
lasso-6f1ffb6de23ab0c05f0eb7d1b4119f73a58d8bd8.zip
add NameIdentifierMappingRequest/Response class and binding
-rw-r--r--lasso/Attic/protocols/Makefile.am4
-rw-r--r--lasso/Attic/protocols/name_identifier_mapping_request.c107
-rw-r--r--lasso/Attic/protocols/name_identifier_mapping_request.h65
-rw-r--r--lasso/Attic/protocols/name_identifier_mapping_response.c116
-rw-r--r--lasso/Attic/protocols/name_identifier_mapping_response.h64
-rw-r--r--python/lasso.py65
-rw-r--r--python/lassomod.c11
-rw-r--r--python/protocols/py_name_identifier_mapping_request.c93
-rw-r--r--python/protocols/py_name_identifier_mapping_request.h47
-rw-r--r--python/protocols/py_name_identifier_mapping_response.c78
-rw-r--r--python/protocols/py_name_identifier_mapping_response.h41
11 files changed, 691 insertions, 0 deletions
diff --git a/lasso/Attic/protocols/Makefile.am b/lasso/Attic/protocols/Makefile.am
index 1a4ab798..572a45e4 100644
--- a/lasso/Attic/protocols/Makefile.am
+++ b/lasso/Attic/protocols/Makefile.am
@@ -20,6 +20,8 @@ liblasso_protocols_la_SOURCES = \
federation_termination_notification.c \
logout_request.c \
logout_response.c \
+ name_identifier_mapping_request.c \
+ name_identifier_mapping_response.c \
register_name_identifier_response.c \
register_name_identifier_request.c
@@ -31,5 +33,7 @@ liblassoinclude_HEADERS = \
federation_termination_notification.h \
logout_request.h \
logout_response.h \
+ name_identifier_mapping_request.h \
+ name_identifier_mapping_response.h \
register_name_identifier_response.h \
register_name_identifier_request.h
diff --git a/lasso/Attic/protocols/name_identifier_mapping_request.c b/lasso/Attic/protocols/name_identifier_mapping_request.c
new file mode 100644
index 00000000..5922b9c0
--- /dev/null
+++ b/lasso/Attic/protocols/name_identifier_mapping_request.c
@@ -0,0 +1,107 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Valery Febvre <vfebvre@easter-eggs.com>
+ * Nicolas Clapies <nclapies@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <lasso/protocols/name_identifier_mapping_request.h>
+#include <lasso/xml/saml_name_identifier.h>
+
+/*****************************************************************************/
+/* public methods */
+/*****************************************************************************/
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+lasso_name_identifier_mapping_request_instance_init(LassoNameIdentifierMappingRequest *request)
+{
+}
+
+static void
+lasso_name_identifier_mapping_request_class_init(LassoNameIdentifierMappingRequestClass *class)
+{
+}
+
+GType lasso_name_identifier_mapping_request_get_type() {
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoNameIdentifierMappingRequestClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) lasso_name_identifier_mapping_request_class_init,
+ NULL,
+ NULL,
+ sizeof(LassoNameIdentifierMappingRequest),
+ 0,
+ (GInstanceInitFunc) lasso_name_identifier_mapping_request_instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_LIB_NAME_IDENTIFIER_MAPPING_REQUEST,
+ "LassoNameIdentifierMappingRequest",
+ &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoNode*
+lasso_name_identifier_mapping_request_new(const xmlChar *providerID,
+ const xmlChar *nameIdentifier,
+ const xmlChar *nameQualifier,
+ const xmlChar *format)
+{
+ LassoNode *request, *identifier;
+
+ request = LASSO_NODE(g_object_new(LASSO_TYPE_NAME_IDENTIFIER_MAPPING_REQUEST, NULL));
+
+ /* Set ONLY required elements/attributs */
+ /* RequestID */
+ lasso_samlp_request_abstract_set_requestID(LASSO_SAMLP_REQUEST_ABSTRACT(request),
+ (const xmlChar *)lasso_build_unique_id(32));
+ /* MajorVersion */
+ lasso_samlp_request_abstract_set_majorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(request),
+ lassoLibMajorVersion);
+ /* MinorVersion */
+ lasso_samlp_request_abstract_set_minorVersion(LASSO_SAMLP_REQUEST_ABSTRACT(request),
+ lassoLibMinorVersion);
+ /* IssueInstant */
+ lasso_samlp_request_abstract_set_issueInstance(LASSO_SAMLP_REQUEST_ABSTRACT(request),
+ lasso_get_current_time());
+ /* ProviderID */
+ lasso_lib_name_identifier_mapping_request_set_providerID(LASSO_LIB_NAME_IDENTIFIER_MAPPING_REQUEST(request),
+ providerID);
+
+ identifier = lasso_saml_name_identifier_new(nameIdentifier);
+ lasso_saml_name_identifier_set_nameQualifier(LASSO_SAML_NAME_IDENTIFIER(identifier),
+ nameQualifier);
+ lasso_saml_name_identifier_set_format(LASSO_SAML_NAME_IDENTIFIER(identifier),
+ format);
+
+ lasso_lib_name_identifier_mapping_request_set_nameIdentifier(LASSO_LIB_NAME_IDENTIFIER_MAPPING_REQUEST(request),
+ LASSO_SAML_NAME_IDENTIFIER(identifier));
+
+ return (request);
+}
diff --git a/lasso/Attic/protocols/name_identifier_mapping_request.h b/lasso/Attic/protocols/name_identifier_mapping_request.h
new file mode 100644
index 00000000..67cfcbb7
--- /dev/null
+++ b/lasso/Attic/protocols/name_identifier_mapping_request.h
@@ -0,0 +1,65 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Valery Febvre <vfebvre@easter-eggs.com>
+ * Nicolas Clapies <nclapies@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __LASSO_NAME_IDENTIFIER_MAPPING_REQUEST_H__
+#define __LASSO_NAME_IDENTIFIER_MAPPING_REQUEST_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/lib_name_identifier_mapping_request.h>
+
+#define LASSO_TYPE_NAME_IDENTIFIER_MAPPING_REQUEST (lasso_name_identifier_mapping_request_get_type())
+#define LASSO_NAME_IDENTIFIER_MAPPING_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_REQUEST, LassoNameIdentifierMappingRequest))
+#define LASSO_NAME_IDENTIFIER_MAPPING_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_REQUEST, LassoNameIdentifierMappingRequestClass))
+#define LASSO_IS_NAME_IDENTIFIER_MAPPING_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_REQUEST))
+#define LASSP_IS_NAME_IDENTIFIER_MAPPING_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_REQUEST))
+#define LASSO_NAME_IDENTIFIER_MAPPING_REQUEST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_REQUEST, LassoNameIdentifierMappingRequestClass))
+
+typedef struct _LassoNameIdentifierMappingRequest LassoNameIdentifierMappingRequest;
+typedef struct _LassoNameIdentifierMappingRequestClass LassoNameIdentifierMappingRequestClass;
+
+struct _LassoNameIdentifierMappingRequest {
+ LassoLibNameIdentifierMappingRequest parent;
+ /*< public >*/
+ /*< private >*/
+};
+
+struct _LassoNameIdentifierMappingRequestClass {
+ LassoLibNameIdentifierMappingRequestClass parent;
+};
+
+LASSO_EXPORT GType lasso_name_identifier_mapping_request_get_type (void);
+LASSO_EXPORT LassoNode* lasso_name_identifier_mapping_request_new (const xmlChar *providerID,
+ const xmlChar *nameIdentifier,
+ const xmlChar *nameQualifier,
+ const xmlChar *format);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_NAME_IDENTIFIER_MAPPING_REQUEST_H__ */
diff --git a/lasso/Attic/protocols/name_identifier_mapping_response.c b/lasso/Attic/protocols/name_identifier_mapping_response.c
new file mode 100644
index 00000000..88088ba2
--- /dev/null
+++ b/lasso/Attic/protocols/name_identifier_mapping_response.c
@@ -0,0 +1,116 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Valery Febvre <vfebvre@easter-eggs.com>
+ * Nicolas Clapies <nclapies@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <lasso/protocols/name_identifier_mapping_response.h>
+
+/*****************************************************************************/
+/* public methods */
+/*****************************************************************************/
+
+/*****************************************************************************/
+/* instance and class init functions */
+/*****************************************************************************/
+
+static void
+lasso_name_identifier_mapping_response_instance_init(LassoNameIdentifierMappingResponse *response)
+{
+}
+
+static void
+lasso_name_identifier_mapping_response_class_init(LassoNameIdentifierMappingResponseClass *class)
+{
+}
+
+GType lasso_name_identifier_mapping_response_get_type() {
+ static GType this_type = 0;
+
+ if (!this_type) {
+ static const GTypeInfo this_info = {
+ sizeof (LassoNameIdentifierMappingResponseClass),
+ NULL,
+ NULL,
+ (GClassInitFunc) lasso_name_identifier_mapping_response_class_init,
+ NULL,
+ NULL,
+ sizeof(LassoNameIdentifierMappingResponse),
+ 0,
+ (GInstanceInitFunc) lasso_name_identifier_mapping_response_instance_init,
+ };
+
+ this_type = g_type_register_static(LASSO_TYPE_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE,
+ "LassoNameIdentifierMappingResponse",
+ &this_info, 0);
+ }
+ return this_type;
+}
+
+LassoNode*
+lasso_name_identifier_mapping_response_new(const xmlChar *providerID,
+ const xmlChar *statusCodeValue,
+ LassoNode *request)
+{
+ LassoNode *response, *ss, *ssc;
+ xmlChar *inResponseTo, *recipient, *relayState;
+
+ response = LASSO_NODE(g_object_new(LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE, NULL));
+
+ /* Set ONLY required elements/attributs */
+ /* ResponseID */
+ lasso_samlp_response_abstract_set_responseID(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
+ (const xmlChar *)lasso_build_unique_id(32));
+ /* MajorVersion */
+ lasso_samlp_response_abstract_set_majorVersion(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
+ lassoLibMajorVersion);
+ /* MinorVersion */
+ lasso_samlp_response_abstract_set_minorVersion(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
+ lassoLibMinorVersion);
+ /* IssueInstant */
+ lasso_samlp_response_abstract_set_issueInstance(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
+ lasso_get_current_time());
+ /* ProviderID */
+ lasso_lib_name_identifier_mapping_response_set_providerID(LASSO_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE(response),
+ providerID);
+
+ inResponseTo = xmlNodeGetContent((xmlNodePtr)lasso_node_get_attr(request, "RequestID"));
+ recipient = lasso_node_get_content(lasso_node_get_child(request, "ProviderID"));
+
+ lasso_samlp_response_abstract_set_inResponseTo(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
+ inResponseTo);
+
+ lasso_samlp_response_abstract_set_recipient(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
+ recipient);
+
+ ss = lasso_samlp_status_new();
+ ssc = lasso_samlp_status_code_new();
+ lasso_samlp_status_code_set_value(LASSO_SAMLP_STATUS_CODE(ssc),
+ statusCodeValue);
+ lasso_samlp_status_set_statusCode(LASSO_SAMLP_STATUS(ss),
+ LASSO_SAMLP_STATUS_CODE(ssc));
+
+ lasso_lib_name_identifier_mapping_response_set_status(LASSO_SAMLP_RESPONSE_ABSTRACT(response),
+ LASSO_SAMLP_STATUS(ss));
+
+ return (response);
+}
diff --git a/lasso/Attic/protocols/name_identifier_mapping_response.h b/lasso/Attic/protocols/name_identifier_mapping_response.h
new file mode 100644
index 00000000..f2e18dc2
--- /dev/null
+++ b/lasso/Attic/protocols/name_identifier_mapping_response.h
@@ -0,0 +1,64 @@
+/* $Id$
+ *
+ * Lasso - A free implementation of the Liberty Alliance specifications.
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.entrouvert.org
+ *
+ * Authors: Valery Febvre <vfebvre@easter-eggs.com>
+ * Nicolas Clapies <nclapies@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE_H__
+#define __LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <lasso/xml/lib_name_identifier_mapping_response.h>
+
+#define LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE (lasso_name_identifier_mapping_response_get_type())
+#define LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE, LassoNameIdentifierMappingResponse))
+#define LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE, LassoNameIdentifierMappingResponseClass))
+#define LASSO_IS_NAME_IDENTIFIER_MAPPING_RESPONSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE))
+#define LASSP_IS_NAME_IDENTIFIER_MAPPING_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE))
+#define LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_NAME_IDENTIFIER_MAPPING_RESPONSE, LassoNameIdentifierMappingResponseClass))
+
+typedef struct _LassoNameIdentifierMappingResponse LassoNameIdentifierMappingResponse;
+typedef struct _LassoNameIdentifierMappingResponseClass LassoNameIdentifierMappingResponseClass;
+
+struct _LassoNameIdentifierMappingResponse {
+ LassoLibNameIdentifierMappingResponse parent;
+ /*< public >*/
+ /*< private >*/
+};
+
+struct _LassoNameIdentifierMappingResponseClass {
+ LassoLibNameIdentifierMappingResponseClass parent;
+};
+
+LASSO_EXPORT GType lasso_name_identifier_mapping_response_get_type (void);
+LASSO_EXPORT LassoNode* lasso_name_identifier_mapping_response_new (const xmlChar *providerID,
+ const xmlChar *statusCodeValue,
+ LassoNode *request);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE_H__ */
diff --git a/python/lasso.py b/python/lasso.py
index f6e8eeac..77d26f94 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -419,3 +419,68 @@ class FederationTerminationNotification(Node):
if name == "node":
ret = Node(_obj=ret)
return ret
+
+
+class NameIdentifierMappingRequest(Node):
+ def __init__(self,
+ providerID,
+ nameIdentifier, nameQualifier, format,
+ consent = None,
+ _obj=None):
+ """
+ """
+ if _obj != None:
+ self._o = _obj
+ return
+ self._o = lassomod.name_identifier_mapping_request(providerID,
+ nameIdentifier, nameQualifier, format)
+ if self._o is None: raise Error('lasso_name_identifier_mapping_request() failed')
+
+ if consent:
+ lassomod.name_identifier_mapping_request_set_consent(self, consent)
+
+ def __isprivate(self, name):
+ return name == '_o'
+
+ def __getattr__(self, name):
+ if self.__isprivate(name):
+ return self.__dict__[name]
+ if name[:2] == "__" and name[-2:] == "__" and name != "__members__":
+ raise AttributeError, name
+ ret = lassomod.name_identifier_mapping_request_getattr(self, name)
+ if ret is None:
+ raise AttributeError, name
+ if name == "node":
+ ret = Node(_obj=ret)
+ return ret
+
+class NameIdentifierMappingResponse(Node):
+ def __init__(self,
+ providerID,
+ statusCodeValue,
+ request,
+ _obj=None):
+ """
+ """
+ if _obj != None:
+ self._o = _obj
+ return
+ self._o = lassomod.name_identifier_mapping_response(providerID,
+ statusCodeValue,
+ request)
+ if self._o is None: raise Error('lasso_name_identifier_mapping_response() failed')
+
+ def __isprivate(self, name):
+ return name == '_o'
+
+ def __getattr__(self, name):
+ if self.__isprivate(name):
+ return self.__dict__[name]
+ if name[:2] == "__" and name[-2:] == "__" and name != "__members__":
+ raise AttributeError, name
+ ret = lassomod.name_identifier_mapping_response_getattr(self, name)
+ if ret is None:
+ raise AttributeError, name
+ if name == "node":
+ ret = Node(_obj=ret)
+ return ret
diff --git a/python/lassomod.c b/python/lassomod.c
index eef24563..86d02b28 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -31,6 +31,8 @@
#include "protocols/py_register_name_identifier_request.h"
#include "protocols/py_register_name_identifier_response.h"
#include "protocols/py_federation_termination_notification.h"
+#include "protocols/py_name_identifier_mapping_request.h"
+#include "protocols/py_name_identifier_mapping_response.h"
static PyMethodDef lasso_methods[] = {
/* py_lasso.h */
@@ -96,6 +98,15 @@ static PyMethodDef lasso_methods[] = {
{"federation_termination_notification", federation_termination_notification, METH_VARARGS},
{"federation_termination_notification_set_consent", federation_termination_notification_set_consent, METH_VARARGS},
+ /* py_name_identifier_mapping_request.h */
+ {"name_identifier_mapping_request_getattr", name_identifier_mapping_request_getattr, METH_VARARGS},
+ {"name_identifier_mapping_request", name_identifier_mapping_request, METH_VARARGS},
+ {"name_identifier_mapping_request_set_consent", name_identifier_mapping_request_set_consent, METH_VARARGS},
+
+ {"name_identifier_mapping_response_getattr", name_identifier_mapping_response_getattr, METH_VARARGS},
+ {"name_identifier_mapping_response", name_identifier_mapping_response, METH_VARARGS},
+
+
{NULL, NULL} /* End of Methods Sentinel */
};
diff --git a/python/protocols/py_name_identifier_mapping_request.c b/python/protocols/py_name_identifier_mapping_request.c
new file mode 100644
index 00000000..7b691326
--- /dev/null
+++ b/python/protocols/py_name_identifier_mapping_request.c
@@ -0,0 +1,93 @@
+/* $Id$
+ *
+ * PyLasso -- Python bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.labs.libre-entreprise.org
+ *
+ * Author: Valery Febvre <vfebvre@easter-eggs.com>
+ * Nicolas Clapies <nclapies@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "../lassomod.h"
+
+#include "../xml/py_xml.h"
+#include "py_name_identifier_mapping_request.h"
+
+PyObject *lassoNameIdentifierMappingRequest_wrap(LassoNameIdentifierMappingRequest *request) {
+ PyObject *ret;
+
+ if (request == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCObject_FromVoidPtrAndDesc((void *) request,
+ (char *) "LassoNameIdentifierMappingRequest *", NULL);
+ return (ret);
+}
+
+PyObject *name_identifier_mapping_request_getattr(PyObject *self, PyObject *args) {
+ PyObject *request_obj;
+ LassoNameIdentifierMappingRequest *request;
+ const char *attr;
+
+ if (CheckArgs(args, "OS:name_identifier_mapping_request_get_attr")) {
+ if (!PyArg_ParseTuple(args, "Os:name_identifier_mapping_request_get_attr", &request_obj, &attr))
+ return NULL;
+ }
+ else return NULL;
+
+ request = lassoNameIdentifierMappingRequest_get(request_obj);
+
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
+PyObject *name_identifier_mapping_request(PyObject *self, PyObject *args) {
+ const xmlChar *providerID;
+ const xmlChar *nameIdentifier;
+ const xmlChar *nameQualifier;
+ const xmlChar *format;
+
+ LassoNameIdentifierMappingRequest *request;
+
+ if(!PyArg_ParseTuple(args, (char *) "ssss:name_identifier_mapping_request",
+ &providerID,
+ &nameIdentifier, &nameQualifier, &format))
+ return NULL;
+
+ request = (LassoNameIdentifierMappingRequest *)lasso_name_identifier_mapping_request_new(providerID,
+ nameIdentifier,
+ nameQualifier,
+ format);
+
+ return (lassoNameIdentifierMappingRequest_wrap(request));
+}
+
+PyObject *name_identifier_mapping_request_set_consent(PyObject *self, PyObject *args){
+ PyObject *request_obj;
+ const xmlChar *consent;
+
+ if(!PyArg_ParseTuple(args, (char *) "Os:name_identifier_mapping_request_set_consent",
+ &request_obj, &consent))
+ return NULL;
+
+ lasso_lib_name_identifier_mapping_request_set_consent(lassoNameIdentifierMappingRequest_get(request_obj),
+ consent);
+
+ return (int_wrap(1));
+}
diff --git a/python/protocols/py_name_identifier_mapping_request.h b/python/protocols/py_name_identifier_mapping_request.h
new file mode 100644
index 00000000..fca869ca
--- /dev/null
+++ b/python/protocols/py_name_identifier_mapping_request.h
@@ -0,0 +1,47 @@
+/* $Id$
+ *
+ * PyLasso -- Python bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.labs.libre-entreprise.org
+ *
+ * Author: Valery Febvre <vfebvre@easter-eggs.com>
+ * Nicolas Clapies <nclapies@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_REQUEST_H__
+#define __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_REQUEST_H__
+
+#include <lasso/protocols/name_identifier_mapping_request.h>
+#include <lasso/xml/lib_name_identifier_mapping_request.h>
+
+typedef struct {
+ PyObject_HEAD
+ LassoNameIdentifierMappingRequest *obj;
+} LassoNameIdentifierMappingRequest_object;
+
+#define lassoNameIdentifierMappingRequest_get(v) (((v) == Py_None) ? NULL : (((LassoNameIdentifierMappingRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj))
+PyObject *lassoNameIdentifierMappingRequest_wrap(LassoNameIdentifierMappingRequest *request);
+
+PyObject *name_identifier_mapping_request_getattr(PyObject *self, PyObject *args);
+PyObject *name_identifier_mapping_request(PyObject *self, PyObject *args);
+
+PyObject *name_identifier_mapping_request_set_sessionIndex(PyObject *self, PyObject *args);
+PyObject *name_identifier_mapping_request_set_relayState(PyObject *self, PyObject *args);
+PyObject *name_identifier_mapping_request_set_consent(PyObject *self, PyObject *args);
+
+#endif /* __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_REQUEST_H__ */
diff --git a/python/protocols/py_name_identifier_mapping_response.c b/python/protocols/py_name_identifier_mapping_response.c
new file mode 100644
index 00000000..76a2cd40
--- /dev/null
+++ b/python/protocols/py_name_identifier_mapping_response.c
@@ -0,0 +1,78 @@
+/* $Id$
+ *
+ * PyLasso -- Python bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.labs.libre-entreprise.org
+ *
+ * Author: Valery Febvre <vfebvre@easter-eggs.com>
+ * Nicolas Clapies <nclapies@entrouvert.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "../lassomod.h"
+
+#include "../xml/py_xml.h"
+#include "py_name_identifier_mapping_request.h"
+#include "py_name_identifier_mapping_response.h"
+
+PyObject *lassoNameIdentifierMappingResponse_wrap(LassoNameIdentifierMappingResponse *response) {
+ PyObject *ret;
+
+ if (response == NULL) {
+ Py_INCREF(Py_None);
+ return (Py_None);
+ }
+ ret = PyCObject_FromVoidPtrAndDesc((void *) response,
+ (char *) "LassoNameIdentifierMappingResponse *", NULL);
+ return (ret);
+}
+
+PyObject *name_identifier_mapping_response_getattr(PyObject *self, PyObject *args) {
+ PyObject *response_obj;
+ LassoNameIdentifierMappingResponse *response;
+ const char *attr;
+
+ if (CheckArgs(args, "OS:name_identifier_mapping_response_get_attr")) {
+ if (!PyArg_ParseTuple(args, "Os:name_identifier_mapping_response_get_attr", &response_obj, &attr))
+ return NULL;
+ }
+ else return NULL;
+
+ response = lassoNameIdentifierMappingResponse_get(response_obj);
+
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
+PyObject *name_identifier_mapping_response(PyObject *self, PyObject *args) {
+ const xmlChar *providerID;
+ const xmlChar *statusCodeValue;
+ PyObject *request_obj;
+
+ LassoNameIdentifierMappingResponse *response;
+
+ if(!PyArg_ParseTuple(args, (char *) "ssO:name_identifier_mapping_response",
+ &providerID,
+ &statusCodeValue, &request_obj))
+ return NULL;
+
+ response = (LassoNameIdentifierMappingResponse *)lasso_name_identifier_mapping_response_new(providerID,
+ statusCodeValue,
+ lassoNameIdentifierMappingRequest_get(request_obj));
+
+ return (lassoNameIdentifierMappingResponse_wrap(response));
+}
diff --git a/python/protocols/py_name_identifier_mapping_response.h b/python/protocols/py_name_identifier_mapping_response.h
new file mode 100644
index 00000000..cdf1bb59
--- /dev/null
+++ b/python/protocols/py_name_identifier_mapping_response.h
@@ -0,0 +1,41 @@
+/* $Id$
+ *
+ * PyLasso -- Python bindings for Lasso library
+ *
+ * Copyright (C) 2004 Entr'ouvert
+ * http://lasso.labs.libre-entreprise.org
+ *
+ * Author: Valery Febvre <vfebvre@easter-eggs.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_RESPONSE_H__
+#define __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_RESPONSE_H__
+
+#include <lasso/protocols/name_identifier_mapping_response.h>
+
+typedef struct {
+ PyObject_HEAD
+ LassoNameIdentifierMappingResponse *obj;
+} LassoNameIdentifierMappingResponse_object;
+
+#define lassoNameIdentifierMappingResponse_get(v) (((v) == Py_None) ? NULL : (((LassoNameIdentifierMappingResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj))
+PyObject *lassoNameIdentifierMappingResponse_wrap(LassoNameIdentifierMappingResponse *response);
+
+PyObject *name_identifier_mapping_response_getattr(PyObject *self, PyObject *args);
+PyObject *name_identifier_mapping_response(PyObject *self, PyObject *args);
+
+#endif /* __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_RESPONSE_H__ */