diff options
author | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-09 18:00:27 +0000 |
---|---|---|
committer | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-09 18:00:27 +0000 |
commit | eb450efe8c113e44e002524428d5957d2bc58cf5 (patch) | |
tree | 2cd5c3ba9889db3ec3307764f8648eafb8dfdb8f /python/tests/LibertyEnabledClient.py | |
parent | e851b95362633806e5ec851ff04d458b732d3ccd (diff) | |
download | lasso-eb450efe8c113e44e002524428d5957d2bc58cf5.tar.gz lasso-eb450efe8c113e44e002524428d5957d2bc58cf5.tar.xz lasso-eb450efe8c113e44e002524428d5957d2bc58cf5.zip |
LECP now nearly works. Still a segmentation fault at the end, but Valos is
aware of it.
Diffstat (limited to 'python/tests/LibertyEnabledClient.py')
-rw-r--r-- | python/tests/LibertyEnabledClient.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/python/tests/LibertyEnabledClient.py b/python/tests/LibertyEnabledClient.py index 9a02872b..f25f9c59 100644 --- a/python/tests/LibertyEnabledClient.py +++ b/python/tests/LibertyEnabledClient.py @@ -73,6 +73,7 @@ class LibertyEnabledClient(WebClient): # without metadata, instead of using 'singleSignOnServiceUrl'. idpSingleSignOnServiceUrl = None lassoServerDump = None + principal = None def __init__(self, internet): WebClient.__init__(self, internet) @@ -80,7 +81,15 @@ class LibertyEnabledClient(WebClient): def getLassoServer(self): return lasso.Server.new_from_dump(self.lassoServerDump) + def getSessionTokens(self): + # LECP is a proxy, not au principal, so it doesn't have its own sessionTokens. + if self.principal is None: + return {} + return self.principal.sessionTokens + def login(self, principal, site, path): + self.principal = principal + httpResponse = self.sendHttpRequestToSite(site, 'GET', path) failUnlessEqual( httpResponse.headers['Content-Type'], 'application/vnd.liberty-request+xml') @@ -102,7 +111,20 @@ class LibertyEnabledClient(WebClient): lecp.build_authn_response_msg() failUnless(lecp.msg_url) failUnless(lecp.msg_body) + + del self.principal + # FIXME: Should we use 'multipart/form-data' for forms? return self.sendHttpRequest( 'POST', lecp.msg_url, headers = {'Content-Type': 'multipart/form-data'}, form = {'LARES': lecp.msg_body}) + + def setKeyring(self, keyring): + # LECP is a proxy, not au principal, so it doesn't have its own keyring. + pass + + def setSessionTokens(self, sessionTokens): + # LECP is a proxy, not au principal, so it doesn't have its own sessionTokens. + pass + + sessionTokens = property(getSessionTokens, setSessionTokens) |