diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/examples/defederation.py | 2 | ||||
-rw-r--r-- | python/lasso.py | 14 | ||||
-rw-r--r-- | python/lassomod.c | 2 | ||||
-rwxr-xr-x | python/setup.py | 1 |
4 files changed, 11 insertions, 8 deletions
diff --git a/python/examples/defederation.py b/python/examples/defederation.py index a07c2331..7847c97e 100644 --- a/python/examples/defederation.py +++ b/python/examples/defederation.py @@ -33,6 +33,8 @@ spdefederation.build_notification_msg() print 'url : ', spdefederation.msg_url print 'body : ', spdefederation.msg_body +print lasso.get_request_type_from_soap_msg(spdefederation.msg_body) + # idp federation termination : print "---------------------------------------------------------" diff --git a/python/lasso.py b/python/lasso.py index 71e170f8..43fb3a29 100644 --- a/python/lasso.py +++ b/python/lasso.py @@ -47,6 +47,9 @@ def shutdown(): """ return lassomod.shutdown() +def get_request_type_from_soap_msg(soap_buffer): + return lassomod.profile_context_get_request_type_from_soap_msg(soap_buffer); + ################################################################################ # xml : low level classes ################################################################################ @@ -1036,10 +1039,9 @@ class FederationTermination: if name[:2] == "__" and name[-2:] == "__" and name != "__members__": raise AttributeError, name ret = lassomod.federation_termination_getattr(self, name) - if ret is None: - raise AttributeError, name - if name == "user": - ret = User(_obj=ret) + if ret: + if name=="user": + ret = User(_obj=ret) return ret def new(cls, server, user, provider_type): @@ -1084,10 +1086,6 @@ class RegisterNameIdentifier: if name[:2] == "__" and name[-2:] == "__" and name != "__members__": raise AttributeError, name ret = lassomod.register_name_identifier_getattr(self, name) - if ret is None: - raise AttributeError, name - if name == "user": - ret = User(_obj=ret) return ret def new(cls, server, user, provider_type): diff --git a/python/lassomod.c b/python/lassomod.c index 9135b060..1e34c17c 100644 --- a/python/lassomod.c +++ b/python/lassomod.c @@ -56,6 +56,7 @@ #include "environs/py_federation_termination.h" #include "environs/py_login.h" #include "environs/py_logout.h" +#include "environs/py_profile_context.h" #include "environs/py_register_name_identifier.h" #include "environs/py_server.h" #include "environs/py_user.h" @@ -198,6 +199,7 @@ static PyMethodDef lasso_methods[] = { {"authentication_statement_new", authentication_statement_new, METH_VARARGS}, /* environs */ + {"profile_context_get_request_type_from_soap_msg", profile_context_get_request_type_from_soap_msg, METH_VARARGS}, /* py_federation_termination.h */ {"federation_termination_getattr", federation_termination_getattr, METH_VARARGS}, diff --git a/python/setup.py b/python/setup.py index fc2b0269..9799c610 100755 --- a/python/setup.py +++ b/python/setup.py @@ -219,6 +219,7 @@ em = Extension("lassomod", "environs/py_federation_termination.c", "environs/py_login.c", "environs/py_logout.c", + "environs/py_profile_context.c", "environs/py_register_name_identifier.c", "environs/py_server.c", "environs/py_user.c", |