diff options
| author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-10 01:33:56 +0000 |
|---|---|---|
| committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-10 01:33:56 +0000 |
| commit | 1ed5aafdc04e029d9a902fd8b6df2220820c519f (patch) | |
| tree | 5cc274ef59895141e1009269001e649dbb910f2c /python/lasso.py | |
| parent | 1c41403396d1b13e18664da38a7615bffd8624a1 (diff) | |
| download | lasso-1ed5aafdc04e029d9a902fd8b6df2220820c519f.tar.gz lasso-1ed5aafdc04e029d9a902fd8b6df2220820c519f.tar.xz lasso-1ed5aafdc04e029d9a902fd8b6df2220820c519f.zip | |
*** empty log message ***
Diffstat (limited to 'python/lasso.py')
| -rw-r--r-- | python/lasso.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/python/lasso.py b/python/lasso.py index 0b9f4773..0f825ec1 100644 --- a/python/lasso.py +++ b/python/lasso.py @@ -790,6 +790,14 @@ class AuthenticationStatement(Node): ################################################################################ SignatureMethodRsaSha1 = 1 SignatureMethodDsaSha1 = 2 + +MessageTypeNone = 0 +MessageTypeAuthnRequest = 1 +MessageTypeAuthnResponse = 2 +MessageTypeRequest = 3 +MessageTypeResponse = 4 +MessageTypeArtifact = 5 + class Server: """\brief Short desc @@ -812,6 +820,56 @@ class Server: public_key, certificate) +class Login: + """\brief Short desc + + Long desc + """ + + def __init__(self, _obj): + """ + The constructor + """ + self._o = _obj + + 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.login_getattr(self, name) + if ret is None: + raise AttributeError, name + if name == "request": + if lassomod.login_getattr(self, "request_type") == MessageTypeAuthnRequest: + ret = AuthnRequest(None, _obj=ret) + # TODO + if name == "response": + ret = Node(_obj=ret) + return ret + + def new(cls, server, user=None): + obj = lassomod.login_new(server, user) + return Login(obj) + new = classmethod(new) + + def build_artifact_msg(self, authentication_result, authenticationMethod, + reauthenticateOnOrAfter, method): + return lassomod.login_build_artifact_msg(self, authentication_result, + authenticationMethod, + reauthenticateOnOrAfter, + method) + + def build_authn_request_msg(self): + return lassomod.login_build_authn_request_msg(self) + + def init_authn_request(self, remote_providerID): + return lassomod.login_init_authn_request(self, remote_providerID) + + class Logout: """\brief Short desc |
