From a126ff51729dfd323186ab19c71dc84a1eba74ff Mon Sep 17 00:00:00 2001 From: Valery Febvre Date: Thu, 13 May 2004 23:55:48 +0000 Subject: authn_response_new_from_export() function added --- python/protocols/py_authn_response.c | 17 +++++++++++++++++ python/protocols/py_authn_response.h | 1 + 2 files changed, 18 insertions(+) (limited to 'python') diff --git a/python/protocols/py_authn_response.c b/python/protocols/py_authn_response.c index 302aeb1a..bd8e3dbc 100644 --- a/python/protocols/py_authn_response.c +++ b/python/protocols/py_authn_response.c @@ -89,6 +89,23 @@ PyObject *authn_response_new_from_dump(PyObject *self, PyObject *args) { return (LassoAuthnResponse_wrap(LASSO_AUTHN_RESPONSE(response))); } +PyObject *authn_response_new_from_export(PyObject *self, PyObject *args) { + xmlChar *buffer; + gint type; + LassoNode *response; + + if (CheckArgs(args, "Si:authn_response_new_from_export")) { + if(!PyArg_ParseTuple(args, (char *) "si:authn_response_new_from_export", + &buffer, &type)) + return NULL; + } + else return NULL; + + response = lasso_authn_response_new_from_export(buffer, type); + + return (LassoAuthnResponse_wrap(LASSO_AUTHN_RESPONSE(response))); +} + PyObject *authn_response_new_from_request_query(PyObject *self, PyObject *args) { xmlChar *query = NULL; const xmlChar *providerID = NULL; diff --git a/python/protocols/py_authn_response.h b/python/protocols/py_authn_response.h index 429745bd..f3d54c0f 100644 --- a/python/protocols/py_authn_response.h +++ b/python/protocols/py_authn_response.h @@ -39,6 +39,7 @@ PyObject *LassoAuthnResponse_wrap(LassoAuthnResponse *response); PyObject *authn_response_getattr(PyObject *self, PyObject *args); PyObject *authn_response_new_from_dump(PyObject *self, PyObject *args); +PyObject *authn_response_new_from_export(PyObject *self, PyObject *args); PyObject *authn_response_new_from_request_query(PyObject *self, PyObject *args); PyObject *authn_response_must_authenticate(PyObject *self, PyObject *args); PyObject *authn_response_process_authentication_result(PyObject *self, PyObject *args); -- cgit