summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-07-22 00:47:01 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-07-22 00:47:01 +0000
commiteb682633945cdd2cfafb3fb082b9c9b6b5e31bba (patch)
tree3c3a86ad4b4ba752de0d8df9c7c46daf93f3d43f /python
parent59cac1639ee6d771ebe9ffe118e654d2850f0955 (diff)
downloadlasso-eb682633945cdd2cfafb3fb082b9c9b6b5e31bba.tar.gz
lasso-eb682633945cdd2cfafb3fb082b9c9b6b5e31bba.tar.xz
lasso-eb682633945cdd2cfafb3fb082b9c9b6b5e31bba.zip
Added method set_consent in LibAuthnRequest class
Diffstat (limited to 'python')
-rw-r--r--python/lasso.py3
-rw-r--r--python/lassomod.c5
-rwxr-xr-xpython/setup.py1
-rw-r--r--python/xml/py_lib_authn_request.c18
-rw-r--r--python/xml/py_lib_authn_request.h1
5 files changed, 25 insertions, 3 deletions
diff --git a/python/lasso.py b/python/lasso.py
index 43fb3a29..8b2a238e 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -290,6 +290,9 @@ class LibAuthnRequest(Node):
if _obj is None: raise Error('lasso_lib_authn_request_new() failed')
Node.__init__(self, _obj=_obj)
+ def set_consent(self, consent):
+ lassomod.lib_authn_request_set_consent(self, consent)
+
def set_forceAuthn(self, forceAuthn):
lassomod.lib_authn_request_set_forceAuthn(self, forceAuthn)
diff --git a/python/lassomod.c b/python/lassomod.c
index 1e34c17c..b71dc26a 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -56,7 +56,7 @@
#include "environs/py_federation_termination.h"
#include "environs/py_login.h"
#include "environs/py_logout.h"
-#include "environs/py_profile_context.h"
+/* #include "environs/py_profile_context.h" */
#include "environs/py_register_name_identifier.h"
#include "environs/py_server.h"
#include "environs/py_user.h"
@@ -88,6 +88,7 @@ static PyMethodDef lasso_methods[] = {
/* py_lib_authn_request.h */
{"lib_authn_request_new", lib_authn_request_new, METH_VARARGS},
+ {"lib_authn_request_set_consent", lib_authn_request_set_consent, METH_VARARGS},
{"lib_authn_request_set_forceAuthn", lib_authn_request_set_forceAuthn, METH_VARARGS},
{"lib_authn_request_set_isPassive", lib_authn_request_set_isPassive, METH_VARARGS},
{"lib_authn_request_set_nameIDPolicy", lib_authn_request_set_nameIDPolicy, METH_VARARGS},
@@ -199,7 +200,7 @@ static PyMethodDef lasso_methods[] = {
{"authentication_statement_new", authentication_statement_new, METH_VARARGS},
/* environs */
- {"profile_context_get_request_type_from_soap_msg", profile_context_get_request_type_from_soap_msg, METH_VARARGS},
+/* {"profile_context_get_request_type_from_soap_msg", profile_context_get_request_type_from_soap_msg, METH_VARARGS}, */
/* py_federation_termination.h */
{"federation_termination_getattr", federation_termination_getattr, METH_VARARGS},
diff --git a/python/setup.py b/python/setup.py
index 9799c610..fc2b0269 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -219,7 +219,6 @@ em = Extension("lassomod",
"environs/py_federation_termination.c",
"environs/py_login.c",
"environs/py_logout.c",
- "environs/py_profile_context.c",
"environs/py_register_name_identifier.c",
"environs/py_server.c",
"environs/py_user.c",
diff --git a/python/xml/py_lib_authn_request.c b/python/xml/py_lib_authn_request.c
index 2aef05bf..8bbda4f8 100644
--- a/python/xml/py_lib_authn_request.c
+++ b/python/xml/py_lib_authn_request.c
@@ -49,6 +49,24 @@ PyObject *lib_authn_request_new(PyObject *self, PyObject *args) {
return (LassoLibAuthnRequest_wrap(LASSO_LIB_AUTHN_REQUEST(request)));
}
+PyObject *lib_authn_request_set_consent(PyObject *self, PyObject *args) {
+ PyObject *node_obj;
+ const xmlChar *consent;
+
+ if (CheckArgs(args, "OS:lib_authn_request_set_consent")) {
+ if(!PyArg_ParseTuple(args, (char *) "Os:lib_authn_request_set_forceAuthn",
+ &node_obj, &consent))
+ return NULL;
+ }
+ else return NULL;
+
+ lasso_lib_authn_request_set_consent(LassoLibAuthnRequest_get(node_obj),
+ consent);
+
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
PyObject *lib_authn_request_set_forceAuthn(PyObject *self, PyObject *args) {
PyObject *node_obj;
gint forceAuthn;
diff --git a/python/xml/py_lib_authn_request.h b/python/xml/py_lib_authn_request.h
index b6e98ce0..9b142bca 100644
--- a/python/xml/py_lib_authn_request.h
+++ b/python/xml/py_lib_authn_request.h
@@ -37,6 +37,7 @@ typedef struct {
PyObject *LassoLibAuthnRequest_wrap(LassoLibAuthnRequest *request);
PyObject *lib_authn_request_new(PyObject *self, PyObject *args);
+PyObject *lib_authn_request_set_consent(PyObject *self, PyObject *args);
PyObject *lib_authn_request_set_forceAuthn(PyObject *self, PyObject *args);
PyObject *lib_authn_request_set_isPassive(PyObject *self, PyObject *args);
PyObject *lib_authn_request_set_nameIDPolicy(PyObject *self, PyObject *args);