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/examples/login.py | |
parent | 1c41403396d1b13e18664da38a7615bffd8624a1 (diff) | |
download | lasso-1ed5aafdc04e029d9a902fd8b6df2220820c519f.tar.gz lasso-1ed5aafdc04e029d9a902fd8b6df2220820c519f.tar.xz lasso-1ed5aafdc04e029d9a902fd8b6df2220820c519f.zip |
*** empty log message ***
Diffstat (limited to 'python/examples/login.py')
-rw-r--r-- | python/examples/login.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/python/examples/login.py b/python/examples/login.py new file mode 100644 index 00000000..d9e11230 --- /dev/null +++ b/python/examples/login.py @@ -0,0 +1,32 @@ +#! /usr/bin/env python +# -*- coding: utf-8 -*- + +import sys +sys.path.insert(0, '../') +import lasso + +lasso.init() + +#################### +# Service provider # +#################### +server = lasso.Server.new("../../examples/sp.xml", + "../../examples/rsapub.pem", "../../examples/rsakey.pem", "../../examples/rsacert.pem", + lasso.SignatureMethodRsaSha1) + +server.add_provider("../../examples/idp.xml", None, None) + +# creation d'une AuthnRequest +splogin = lasso.Login.new(server, None) +ret = splogin.init_authn_request("https://identity-provider:2003/liberty-alliance/metadata") +splogin.request.set_isPassive(0) +splogin.request.set_forceAuthn(1) +#splogin.request.set_nameIDPolicy(lasso.LibNameIDPolicyTypeFederated) +splogin.request.set_relayState("fake") +splogin.request.set_protocolProfile(lasso.libProtocolProfileBrwsArt) + +print "Request type =", splogin.request_type +print splogin.request.dump() + +print splogin.build_authn_request_msg() +print "message url =", splogin.msg_url |