summaryrefslogtreecommitdiffstats
path: root/python/protocols/py_logout_request.c
diff options
context:
space:
mode:
Diffstat (limited to 'python/protocols/py_logout_request.c')
-rw-r--r--python/protocols/py_logout_request.c42
1 files changed, 38 insertions, 4 deletions
diff --git a/python/protocols/py_logout_request.c b/python/protocols/py_logout_request.c
index e6ead2ea..fde13d34 100644
--- a/python/protocols/py_logout_request.c
+++ b/python/protocols/py_logout_request.c
@@ -44,8 +44,8 @@ PyObject *LassoLogoutRequest_wrap(LassoLogoutRequest *request) {
PyObject *logout_request_new(PyObject *self, PyObject *args) {
const xmlChar *providerID;
const xmlChar *nameIdentifier;
- const xmlChar *nameQualifier = NULL;
- const xmlChar *format = NULL;
+ const xmlChar *nameQualifier;
+ const xmlChar *format;
LassoNode *request;
@@ -56,8 +56,42 @@ PyObject *logout_request_new(PyObject *self, PyObject *args) {
}
else return NULL;
- request = lasso_logout_request_new(providerID, nameIdentifier,
- nameQualifier, format);
+ request = lasso_logout_request_new(providerID,
+ nameIdentifier, nameQualifier, format);
+
+ return (LassoLogoutRequest_wrap(LASSO_LOGOUT_REQUEST(request)));
+}
+
+PyObject *logout_request_new_from_soap(PyObject *self, PyObject *args) {
+ const xmlChar *soap_buffer;
+
+ LassoNode *request;
+
+ if (CheckArgs(args, "S:logout_request_new_from_soap")) {
+ if(!PyArg_ParseTuple(args, (char *) "s:logout_request_new_from_soap",
+ &soap_buffer))
+ return NULL;
+ }
+ else return NULL;
+
+ request = lasso_logout_request_new_from_soap(soap_buffer);
+
+ return (LassoLogoutRequest_wrap(LASSO_LOGOUT_REQUEST(request)));
+}
+
+PyObject *logout_request_new_from_query(PyObject *self, PyObject *args) {
+ const xmlChar *query;
+
+ LassoNode *request;
+
+ if (CheckArgs(args, "S:logout_request_new_from_query")) {
+ if(!PyArg_ParseTuple(args, (char *) "s:logout_request_new_from_query",
+ &query))
+ return NULL;
+ }
+ else return NULL;
+
+ request = lasso_logout_request_new_from_query(query);
return (LassoLogoutRequest_wrap(LASSO_LOGOUT_REQUEST(request)));
}