diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-05-14 00:00:18 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-05-14 00:00:18 +0000 |
| commit | fb0ae5893caba1ed56fff9f122cfd529ecf6ba92 (patch) | |
| tree | 48a76c584191c5a84c898795426aa02a4e84bcf2 /python | |
| parent | 7feb79492a08ef70adb2688b1277fc7c7e49e4d8 (diff) | |
| download | lasso-fb0ae5893caba1ed56fff9f122cfd529ecf6ba92.tar.gz lasso-fb0ae5893caba1ed56fff9f122cfd529ecf6ba92.tar.xz lasso-fb0ae5893caba1ed56fff9f122cfd529ecf6ba92.zip | |
node_export() and node_export_from_base64() functions added
2 export methods in class Node added
Diffstat (limited to 'python')
| -rw-r--r-- | python/lasso.py | 11 | ||||
| -rw-r--r-- | python/lassomod.c | 4 |
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}, |
