summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/lasso.py3
-rw-r--r--python/lassomod.c1
-rw-r--r--python/protocols/py_single_sign_on_and_federation.c14
-rw-r--r--python/protocols/py_single_sign_on_and_federation.h1
4 files changed, 19 insertions, 0 deletions
diff --git a/python/lasso.py b/python/lasso.py
index a85cd79e..a33589cd 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -227,6 +227,9 @@ class Response:
def init(self, authentication_result):
return lassomod.response_init(self, authentication_result)
+ def add_assertion(self, assertion):
+ return lassomod.response_add_assertion(self, assertion)
+
class Node:
def __init__(self, _obj=None):
"""
diff --git a/python/lassomod.c b/python/lassomod.c
index 5e0ad680..96fb2a8c 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -68,6 +68,7 @@ static PyMethodDef lasso_methods[] = {
{"response_create", response_create, METH_VARARGS},
{"response_getattr", response_getattr, METH_VARARGS},
{"response_init", response_init, METH_VARARGS},
+ {"response_add_assertion", response_add_assertion, METH_VARARGS},
{NULL, NULL} /* End of Methods Sentinel */
};
diff --git a/python/protocols/py_single_sign_on_and_federation.c b/python/protocols/py_single_sign_on_and_federation.c
index 74637829..57562fff 100644
--- a/python/protocols/py_single_sign_on_and_federation.c
+++ b/python/protocols/py_single_sign_on_and_federation.c
@@ -417,3 +417,17 @@ PyObject *response_init(PyObject *self, PyObject *args) {
return (int_wrap(ret));
}
+
+PyObject *response_add_assertion(PyObject *self, PyObject *args) {
+ PyObject *response_obj, *assertion_obj;
+ int ret;
+
+ if(!PyArg_ParseTuple(args, (char *) "OO:response_add_assertion",
+ &response_obj, &assertion_obj))
+ return NULL;
+
+ ret = lasso_response_add_assertion(lassoResponse_get(response_obj),
+ LassoNode_get(assertion_obj));
+
+ return (int_wrap(ret));
+}
diff --git a/python/protocols/py_single_sign_on_and_federation.h b/python/protocols/py_single_sign_on_and_federation.h
index 94c75b6f..9ac4fa43 100644
--- a/python/protocols/py_single_sign_on_and_federation.h
+++ b/python/protocols/py_single_sign_on_and_federation.h
@@ -78,5 +78,6 @@ PyObject *request_create(PyObject *self, PyObject *args);
PyObject *response_getattr(PyObject *self, PyObject *args);
PyObject *response_create(PyObject *self, PyObject *args);
PyObject *response_init(PyObject *self, PyObject *args);
+PyObject *response_add_assertion(PyObject *self, PyObject *args);
#endif /* __PYLASSO_PY_SINGLE_SIGN_ON_AND_FEDERATION_H__ */