summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorNicolas Clapies <nclapies@entrouvert.com>2004-04-20 11:50:36 +0000
committerNicolas Clapies <nclapies@entrouvert.com>2004-04-20 11:50:36 +0000
commit11d9dc4e60e7d1ebf5468c95c4446ca7fff9eb5f (patch)
treeb5095869cb679ffd2553c9995d10bd8063068dde /python
parent85b629d971c7ba1fd0cc4823787acf90ae2f2cb2 (diff)
downloadlasso-11d9dc4e60e7d1ebf5468c95c4446ca7fff9eb5f.tar.gz
lasso-11d9dc4e60e7d1ebf5468c95c4446ca7fff9eb5f.tar.xz
lasso-11d9dc4e60e7d1ebf5468c95c4446ca7fff9eb5f.zip
add RegisterNameIdentifierRequest class
Diffstat (limited to 'python')
-rw-r--r--python/lasso.py34
-rw-r--r--python/lassomod.c5
-rwxr-xr-xpython/setup.py1
3 files changed, 40 insertions, 0 deletions
diff --git a/python/lasso.py b/python/lasso.py
index 8ae5818b..cd529551 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -277,6 +277,40 @@ class LogoutResponse:
return lassomod.logout_response_init(self, providerID, statusCodeValue, relayState)
+class RegisterNameIdentifierRequest:
+ def __init__(self, providerID,
+ idpNameIdentifier, idpNameQualifier, idpFormat,
+ spNameIdentifier, spNameQualifier, spFormat,
+ oldNameIdentifier, oldNameQualifier, oldFormat,
+ relayState, _obj=None):
+ """
+ """
+ if _obj != None:
+ self._o = _obj
+ return
+ self._o = lassomod.register_name_identifier_request_create(providerID,
+ idpNameIdentifier, idpNameQualifier, idpFormat,
+ spNameIdentifier, spNameQualifier, spFormat,
+ oldNameIdentifier, oldNameQualifier, oldFormat,
+ relayState)
+ if self._o is None: raise Error('lasso_logout_request_create() failed')
+
+ def __isprivate(self, name):
+ return name == '_o'
+
+ def __getattr__(self, name):
+ if self.__isprivate(name):
+ return self.__dict__[name]
+ if name[:2] == "__" and name[-2:] == "__" and name != "__members__":
+ raise AttributeError, name
+ ret = lassomod.register_name_identifier_request_getattr(self, name)
+ if ret is None:
+ raise AttributeError, name
+ if name == "node":
+ ret = Node(_obj=ret)
+ return ret
+
+
class Node:
def __init__(self, _obj=None):
"""
diff --git a/python/lassomod.c b/python/lassomod.c
index dee23736..688efa0b 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -28,6 +28,7 @@
#include "xml/py_xml.h"
#include "protocols/py_logout.h"
#include "protocols/py_single_sign_on_and_federation.h"
+#include "protocols/py_register_name_identifier.h"
static PyMethodDef lasso_methods[] = {
/* py_lasso.h */
@@ -74,6 +75,10 @@ static PyMethodDef lasso_methods[] = {
{"response_init", response_init, METH_VARARGS},
{"response_add_assertion", response_add_assertion, METH_VARARGS},
+ /* py_register_name_identifier.h */
+ {"register_name_identifier_request_getattr", register_name_identifier_request_getattr, METH_VARARGS},
+ {"register_name_identifier_request_create", register_name_identifier_request_create, METH_VARARGS},
+
{NULL, NULL} /* End of Methods Sentinel */
};
diff --git a/python/setup.py b/python/setup.py
index 209bbea1..4d4b0be3 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -190,6 +190,7 @@ em = Extension("lassomod",
sources = ["py_lasso.c", "xml/py_xml.c",
"protocols/py_single_sign_on_and_federation.c",
"protocols/py_logout.c",
+ "protocols/py_register_name_identifier.c",
"lassomod.c",
"utils.c", "wrap_objs.c"],
define_macros = define_macros,