1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/examples/CGI/OpenIDLoginHandler.py Thu May 01 21:46:24 2008 +0000
1.3 @@ -0,0 +1,19 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere
1.7 +# on the PYTHONPATH.
1.8 +
1.9 +#import sys
1.10 +#sys.path.append("/home/paulb/Software/Python/WebStack")
1.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common")
1.12 +
1.13 +from WebStack.Adapters.CGI import deploy
1.14 +from OpenIDLogin import get_site_map
1.15 +
1.16 +app_url = "http://localhost" # No trailing "/"!
1.17 +deployment_url = "http://localhost/cgi/openidlogin" # No trailing "/"!
1.18 +resource = get_site_map(app_url, deployment_url)
1.19 +
1.20 +deploy(resource, handle_errors=0)
1.21 +
1.22 +# vim: tabstop=4 expandtab shiftwidth=4
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/examples/CGI/SimpleWithOpenIDHandler.py Thu May 01 21:46:24 2008 +0000
2.3 @@ -0,0 +1,31 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere
2.7 +# on the PYTHONPATH.
2.8 +
2.9 +#import sys
2.10 +#sys.path.append("/home/paulb/Software/Python/WebStack")
2.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common")
2.12 +
2.13 +from WebStack.Adapters.CGI import deploy
2.14 +from SimpleWithOpenID import get_site_map
2.15 +
2.16 +# Change this to be the exact URL.
2.17 +# eg. http://localhost:8000/cgi/myapp/requestid
2.18 +
2.19 +initiation_url = "http://localhost/cgi/simplewithopenid/login"
2.20 +
2.21 +# Change this to be the URL base for your server.
2.22 +# eg. http://localhost:8000
2.23 +
2.24 +app_url = "http://localhost"
2.25 +
2.26 +# Must match the key used elsewhere.
2.27 +
2.28 +secret_key = "horses"
2.29 +
2.30 +resource = get_site_map(app_url, initiation_url, secret_key)
2.31 +
2.32 +deploy(resource, handle_errors=0)
2.33 +
2.34 +# vim: tabstop=4 expandtab shiftwidth=4