summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/lasso.py11
-rw-r--r--python/lassomod.c4
2 files changed, 14 insertions, 1 deletions
diff --git a/python/lasso.py b/python/lasso.py
index 58dcc00f..bdf24867 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -64,6 +64,12 @@ class Node:
def dump(self, encoding="utf8", format=1):
return lassomod.node_dump(self, encoding, format)
+ def export(self):
+ return lassomod.node_export(self)
+
+ def export_to_base64(self):
+ return lassomod.node_export_to_base64(self)
+
def export_to_query(self, sign_method, private_key_file):
return lassomod.node_export_to_query(self, sign_method, private_key_file)
@@ -344,6 +350,11 @@ class AuthnResponse(SamlpResponse):
return AuthnResponse(obj)
new_from_dump = classmethod(new_from_dump)
+ def new_from_export(cls, buffer, type=0):
+ obj = lassomod.authn_response_new_from_export(buffer, type)
+ return AuthnResponse(obj)
+ new_from_export = classmethod(new_from_export)
+
def new_from_request_query(cls, query, providerID):
obj = lassomod.authn_response_new_from_request_query(query, providerID)
return AuthnResponse(obj)
diff --git a/python/lassomod.c b/python/lassomod.c
index 05b40c2d..a393cfd5 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -64,6 +64,8 @@ static PyMethodDef lasso_methods[] = {
/* xml */
/* py_xml.h */
{"node_dump", node_dump, METH_VARARGS},
+ {"node_export", node_export, METH_VARARGS},
+ {"node_export_to_base64", node_export_to_base64, METH_VARARGS},
{"node_export_to_query", node_export_to_query, METH_VARARGS},
{"node_export_to_soap", node_export_to_soap, METH_VARARGS},
{"node_get_attr_value", node_get_attr_value, METH_VARARGS},
@@ -136,8 +138,8 @@ static PyMethodDef lasso_methods[] = {
/* py_authn_response.h */
{"authn_response_getattr", authn_response_getattr, METH_VARARGS},
{"authn_response_new_from_dump", authn_response_new_from_dump, METH_VARARGS},
+ {"authn_response_new_from_export", authn_response_new_from_export, METH_VARARGS},
{"authn_response_new_from_request_query", authn_response_new_from_request_query, METH_VARARGS},
-/* {"authn_response_add_assertion", authn_response_add_assertion, METH_VARARGS}, */
{"authn_response_must_authenticate", authn_response_must_authenticate, METH_VARARGS},
{"authn_response_process_authentication_result", authn_response_process_authentication_result, METH_VARARGS},
{"authn_response_verify_signature", authn_response_verify_signature, METH_VARARGS},