From 2b83bc221ab4df6a13651392414f3c995e150d10 Mon Sep 17 00:00:00 2001 From: Nicolas Clapies Date: Tue, 20 Jul 2004 16:05:05 +0000 Subject: update internal code to use new_from_export style --- python/examples/logout.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'python/examples') diff --git a/python/examples/logout.py b/python/examples/logout.py index ec3ed914..faa31e4b 100644 --- a/python/examples/logout.py +++ b/python/examples/logout.py @@ -11,8 +11,9 @@ spserver = lasso.Server.new("../../examples/sp.xml", lasso.signatureMethodRsaSha1) spserver.add_provider("../../examples/idp.xml", None, None) +spserver.add_provider("../../examples/idp2.xml", None, None) -spuser_dump = "LLLLLLLLLLLLLLLLLLLLLLLLL" +spuser_dump = "1111111111111111111111111122222222222222222222222222" spuser = lasso.User.new_from_dump(spuser_dump) @@ -22,8 +23,13 @@ splogout.init_request("https://identity-provider:2003/liberty-alliance/metadata" splogout.build_request_msg() request_msg = splogout.msg_body -print 'request url : ', splogout.msg_url -print 'request body : ', splogout.msg_body +msg_url = splogout.msg_url +msg_body = splogout.msg_body + +splogout.destroy() + +print 'request url : ', msg_url +print 'request body : ', msg_body # LogoutResponse : @@ -36,9 +42,15 @@ idpuser_dump = "< idpuser = lasso.User.new_from_dump(idpuser_dump) idplogout = lasso.Logout.new(idpserver, idpuser, lasso.providerTypeIdp) -idplogout.process_request_msg(request_msg, lasso.httpMethodSoap) -idplogout.build_response_msg() -print 'url : ', idplogout.msg_url -print 'body : ', idplogout.msg_body +#idplogout.process_request_msg(request_msg, lasso.httpMethodSoap) +#idplogout.build_response_msg() + +#msg_url = idplogout.msg_url +#msg_body = idplogout.msg_body +#print 'body : ', idplogout.msg_body + +# process the response : +#splogout = lasso.Logout.new(spserver, spuser, lasso.providerTypeSp) +#splogout.process_response_msg(msg_body, lasso.httpMethodSoap) lasso.shutdown() -- cgit