summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-07-13 00:19:21 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-07-13 00:19:21 +0000
commit0d240f6c5c1a8cf8657400807bae545186a7efe0 (patch)
tree3b958cb33b6f034372d3ab087f4785652ff9eef4 /python
parent07002aa3c5f58583ad917f66e35cb0353b9c7cde (diff)
downloadlasso-0d240f6c5c1a8cf8657400807bae545186a7efe0.tar.gz
lasso-0d240f6c5c1a8cf8657400807bae545186a7efe0.tar.xz
lasso-0d240f6c5c1a8cf8657400807bae545186a7efe0.zip
*** empty log message ***
Diffstat (limited to 'python')
-rw-r--r--python/environs/py_server.c16
-rw-r--r--python/environs/py_server.h1
-rw-r--r--python/examples/login.py2
-rw-r--r--python/lasso.py3
-rw-r--r--python/lassomod.c1
5 files changed, 22 insertions, 1 deletions
diff --git a/python/environs/py_server.c b/python/environs/py_server.c
index fbcce1c6..6f625829 100644
--- a/python/environs/py_server.c
+++ b/python/environs/py_server.c
@@ -99,6 +99,22 @@ PyObject *server_add_provider(PyObject *self, PyObject *args) {
return (Py_None);
}
+PyObject *server_destroy(PyObject *self, PyObject *args) {
+ PyObject *server_obj;
+
+ if (CheckArgs(args, "O:server_destroy")) {
+ if(!PyArg_ParseTuple(args, (char *) "O:server_destroy",
+ &server_obj))
+ return NULL;
+ }
+ else return NULL;
+
+ lasso_server_destroy(LassoServer_get(server_obj));
+
+ Py_INCREF(Py_None);
+ return (Py_None);
+}
+
PyObject *server_dump(PyObject *self, PyObject *args) {
PyObject *server_obj;
gchar *ret;
diff --git a/python/environs/py_server.h b/python/environs/py_server.h
index 02d91954..52b7b6ae 100644
--- a/python/environs/py_server.h
+++ b/python/environs/py_server.h
@@ -39,6 +39,7 @@ PyObject *LassoServer_wrap(LassoServer *server);
PyObject *server_new(PyObject *self, PyObject *args);
PyObject *server_new_from_dump(PyObject *self, PyObject *args);
PyObject *server_add_provider(PyObject *self, PyObject *args);
+PyObject *server_destroy(PyObject *self, PyObject *args);
PyObject *server_dump(PyObject *self, PyObject *args);
#endif /* __PYLASSO_PY_SERVER_H__ */
diff --git a/python/examples/login.py b/python/examples/login.py
index 9e5fea24..c167b92c 100644
--- a/python/examples/login.py
+++ b/python/examples/login.py
@@ -18,7 +18,7 @@ server = lasso.Server.new("../../examples/sp.xml",
server.add_provider("../../examples/idp.xml", None, None)
server_dump = server.dump()
-print server_dump
+server.destroy()
# create AuthnRequest
server = lasso.Server.new_from_dump(server_dump)
diff --git a/python/lasso.py b/python/lasso.py
index ec8a10de..495c05dd 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -832,6 +832,9 @@ class Server:
def dump(self):
return lassomod.server_dump(self)
+ def destroy(self):
+ lassomod.server_destroy(self)
+
class Login:
"""\brief Short desc
diff --git a/python/lassomod.c b/python/lassomod.c
index 8d6c4a69..c080d453 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -229,6 +229,7 @@ static PyMethodDef lasso_methods[] = {
{"server_new", server_new, METH_VARARGS},
{"server_new_from_dump", server_new_from_dump, METH_VARARGS},
{"server_add_provider", server_add_provider, METH_VARARGS},
+ {"server_destroy", server_destroy, METH_VARARGS},
{"server_dump", server_dump, METH_VARARGS},
/* py_user.h */