summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/lasso.py2
-rw-r--r--python/protocols/py_authn_response.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/python/lasso.py b/python/lasso.py
index eea0a596..7e7f4391 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -298,6 +298,8 @@ class AuthnResponse(Node):
ret = lassomod.authn_response_getattr(self, name)
if ret is None:
raise AttributeError, name
+ if name == "request":
+ ret = AuthnRequest(None, _obj=ret)
return ret
def add_assertion(self, assertion, private_key_file, certificate_file):
diff --git a/python/protocols/py_authn_response.c b/python/protocols/py_authn_response.c
index b8f70c76..d47223fd 100644
--- a/python/protocols/py_authn_response.c
+++ b/python/protocols/py_authn_response.c
@@ -27,6 +27,7 @@
#include "../xml/py_xml.h"
#include "py_authn_response.h"
+#include "py_authn_request.h"
/******************************************************************************/
/* LassoAuthnResponse */
@@ -60,7 +61,9 @@ PyObject *authn_response_getattr(PyObject *self, PyObject *args) {
reponse = LassoAuthnResponse_get(reponse_obj);
if (!strcmp(attr, "__members__"))
- return Py_BuildValue("[ss]", "requestID", "query");
+ return Py_BuildValue("[ss]", "request", "query");
+ if (!strcmp(attr, "request"))
+ return (LassoAuthnRequest_wrap(LASSO_AUTHN_REQUEST(reponse->request)));
if (!strcmp(attr, "query"))
return (xmlCharPtr_wrap(reponse->query));