1.1 --- a/examples/BaseHTTPRequestHandler/LoginApp.py Sun May 30 15:33:10 2004 +0000
1.2 +++ b/examples/BaseHTTPRequestHandler/LoginApp.py Sun May 30 15:33:55 2004 +0000
1.3 @@ -14,7 +14,8 @@
1.4 ("badger", "abc"),
1.5 ("vole", "xyz"),
1.6 )
1.7 - )
1.8 + ),
1.9 + anonymous_parameter_name="anonymous"
1.10 )
1.11 )
1.12 address = ("", 8081)
2.1 --- a/examples/BaseHTTPRequestHandler/SimpleWithLogin.py Sun May 30 15:33:10 2004 +0000
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,24 +0,0 @@
2.4 -#!/usr/bin/env python
2.5 -
2.6 -from WebStack.Adapters import BaseHTTPRequestHandler
2.7 -from Simple import SimpleResource
2.8 -from LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
2.9 -import BaseHTTPServer
2.10 -
2.11 -# Special magic incantation.
2.12 -
2.13 -handler = BaseHTTPRequestHandler.HandlerFactory(
2.14 - LoginRedirectResource(
2.15 - login_url="http://localhost:8081",
2.16 - app_url="http://localhost:8080",
2.17 - resource=SimpleResource(),
2.18 - authenticator=LoginRedirectAuthenticator(secret_key="horses"),
2.19 - anonymous_parameter_name="anonymous"
2.20 - )
2.21 -)
2.22 -address = ("", 8080)
2.23 -server = BaseHTTPServer.HTTPServer(address, handler)
2.24 -print "Serving..."
2.25 -server.serve_forever()
2.26 -
2.27 -# vim: tabstop=4 expandtab shiftwidth=4
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/examples/BaseHTTPRequestHandler/SimpleWithLoginApp.py Sun May 30 15:33:55 2004 +0000
3.3 @@ -0,0 +1,24 @@
3.4 +#!/usr/bin/env python
3.5 +
3.6 +from WebStack.Adapters import BaseHTTPRequestHandler
3.7 +from Simple import SimpleResource
3.8 +from LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
3.9 +import BaseHTTPServer
3.10 +
3.11 +# Special magic incantation.
3.12 +
3.13 +handler = BaseHTTPRequestHandler.HandlerFactory(
3.14 + LoginRedirectResource(
3.15 + login_url="http://localhost:8081",
3.16 + app_url="http://localhost:8080",
3.17 + resource=SimpleResource(),
3.18 + authenticator=LoginRedirectAuthenticator(secret_key="horses"),
3.19 + anonymous_parameter_name="anonymous"
3.20 + )
3.21 +)
3.22 +address = ("", 8080)
3.23 +server = BaseHTTPServer.HTTPServer(address, handler)
3.24 +print "Serving..."
3.25 +server.serve_forever()
3.26 +
3.27 +# vim: tabstop=4 expandtab shiftwidth=4