summaryrefslogtreecommitdiffstats
path: root/python/examples/logout.py
diff options
context:
space:
mode:
authorEmmanuel Raviart <eraviart@entrouvert.com>2005-01-22 14:59:33 +0000
committerEmmanuel Raviart <eraviart@entrouvert.com>2005-01-22 14:59:33 +0000
commitdf29bb95b1017de3499eb53ae542c51692d229eb (patch)
treec385a8b2e14a604b1aaf7ddb8ead230f25cd1027 /python/examples/logout.py
parentbc4ab9c01302a9bb8d981cfe7955c88e74d1b1a3 (diff)
downloadlasso-df29bb95b1017de3499eb53ae542c51692d229eb.tar.gz
lasso-df29bb95b1017de3499eb53ae542c51692d229eb.tar.xz
lasso-df29bb95b1017de3499eb53ae542c51692d229eb.zip
SWIG: Renamed constants from camelCase to UPPER_CASE.
Diffstat (limited to 'python/examples/logout.py')
-rw-r--r--python/examples/logout.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/examples/logout.py b/python/examples/logout.py
index b8e86431..46113731 100644
--- a/python/examples/logout.py
+++ b/python/examples/logout.py
@@ -7,7 +7,7 @@ import lasso
# SP1 server and user :
sp1server = lasso.Server.new("../../examples/sp1.xml",
"../../examples/rsapub.pem", "../../examples/rsakey.pem", "../../examples/rsacert.pem",
- lasso.signatureMethodRsaSha1)
+ lasso.SIGNATURE_METHOD_RSA_SHA1)
sp1server.add_provider("../../examples/idp.xml", None, None)
sp1user_dump = "<LassoUser><LassoAssertions><LassoAssertion RemoteProviderID=\"https://identity-provider:2003/liberty-alliance/metadata\"><Assertion AssertionID=\"C9DS8CD7CSD6CDSCKDKCS\"></Assertion></LassoAssertion></LassoAssertions><LassoIdentities><LassoIdentity RemoteProviderID=\"https://identity-provider:2003/liberty-alliance/metadata\"><LassoRemoteNameIdentifier><NameIdentifier NameQualifier=\"qualifier.com\" Format=\"federated\">11111111111111111111111111</NameIdentifier></LassoRemoteNameIdentifier></LassoIdentity></LassoIdentities></LassoUser>"
@@ -15,7 +15,7 @@ sp1user_dump = "<LassoUser><LassoAssertions><LassoAssertion RemoteProviderID=\"h
# SP2 server and user :
sp2server = lasso.Server.new("../../examples/sp2.xml",
"../../examples/rsapub.pem", "../../examples/rsakey.pem", "../../examples/rsacert.pem",
- lasso.signatureMethodRsaSha1)
+ lasso.SIGNATURE_METHOD_RSA_SHA1)
sp2server.add_provider("../../examples/idp.xml", None, None)
sp2user_dump = "<LassoUser><LassoAssertions><LassoAssertion RemoteProviderID=\"https://identity-provider:2003/liberty-alliance/metadata\"><Assertion AssertionID=\"4IK43JCJSDCSDKCSCSDL\"></Assertion></LassoAssertion></LassoAssertions><LassoIdentities><LassoIdentity RemoteProviderID=\"https://identity-provider:2003/liberty-alliance/metadata\"><LassoRemoteNameIdentifier><NameIdentifier NameQualifier=\"qualifier.com\" Format=\"federated\">222222222222222222222222</NameIdentifier></LassoRemoteNameIdentifier></LassoIdentity></LassoIdentities></LassoUser>"
@@ -23,7 +23,7 @@ sp2user_dump = "<LassoUser><LassoAssertions><LassoAssertion RemoteProviderID=\"h
# IDP server and user :
idpserver = lasso.Server.new("../../examples/idp.xml",
"../../examples/rsapub.pem", "../../examples/rsakey.pem", "../../examples/rsacert.pem",
- lasso.signatureMethodRsaSha1)
+ lasso.SIGNATURE_METHOD_RSA_SHA1)
idpserver.add_provider("../../examples/sp1.xml", None, None)
idpserver.add_provider("../../examples/sp2.xml", None, None)
idpserver.add_provider("../../examples/sp3.xml", None, None)
@@ -55,13 +55,13 @@ sp1logout.destroy()
idpuser = lasso.User.new_from_dump(idpuser_dump)
idplogout = lasso.Logout.new(idpserver, lasso.providerTypeIdp)
-if lasso.get_request_type_from_soap_msg(msg_body)==lasso.requestTypeLogout:
+if lasso.get_request_type_from_soap_msg(msg_body)==lasso.REQUEST_TYPE_LOGOUT:
print "it's a logout request !"
#fake response, only for test !
response_msg_body = "<Envelope><LogoutResponse><ProviderID>https://service-provider2:2003/liberty-alliance/metadata</ProviderID><Status><StatusCode Value=\"Samlp:Success\"></StatusCode></Status></LogoutResponse></Envelope>"
-idplogout.load_request_msg(msg_body, lasso.httpMethodSoap)
+idplogout.load_request_msg(msg_body, lasso.HTTP_METHOD_SOAP)
nameIdentifier = idplogout.nameIdentifier
print "get the user dump from NameIdentifier : ", nameIdentifier
idplogout.set_user_from_dump(idpuser_dump)
@@ -76,7 +76,7 @@ while next_provider_id:
print "send soap msg to url", idplogout.msg_url
# remote SP send back a LogoutResponse, process it.
- idplogout.process_response_msg(response_msg_body, lasso.httpMethodSoap)
+ idplogout.process_response_msg(response_msg_body, lasso.HTTP_METHOD_SOAP)
next_provider_id = idplogout.get_next_providerID()