# HG changeset patch # User paulb # Date 1085931235 0 # Node ID 76d2b279896cc66ad40cc959405623b9b2950440 # Parent b995d1bfbb693ce07c9359f83c3fc31a00c167b1 [project @ 2004-05-30 15:33:55 by paulb] Renamed the simple with login example module. Introduced anonymous user details into the login application. diff -r b995d1bfbb69 -r 76d2b279896c examples/BaseHTTPRequestHandler/LoginApp.py --- a/examples/BaseHTTPRequestHandler/LoginApp.py Sun May 30 15:33:10 2004 +0000 +++ b/examples/BaseHTTPRequestHandler/LoginApp.py Sun May 30 15:33:55 2004 +0000 @@ -14,7 +14,8 @@ ("badger", "abc"), ("vole", "xyz"), ) - ) + ), + anonymous_parameter_name="anonymous" ) ) address = ("", 8081) diff -r b995d1bfbb69 -r 76d2b279896c examples/BaseHTTPRequestHandler/SimpleWithLogin.py --- a/examples/BaseHTTPRequestHandler/SimpleWithLogin.py Sun May 30 15:33:10 2004 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -from WebStack.Adapters import BaseHTTPRequestHandler -from Simple import SimpleResource -from LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator -import BaseHTTPServer - -# Special magic incantation. - -handler = BaseHTTPRequestHandler.HandlerFactory( - LoginRedirectResource( - login_url="http://localhost:8081", - app_url="http://localhost:8080", - resource=SimpleResource(), - authenticator=LoginRedirectAuthenticator(secret_key="horses"), - anonymous_parameter_name="anonymous" - ) -) -address = ("", 8080) -server = BaseHTTPServer.HTTPServer(address, handler) -print "Serving..." -server.serve_forever() - -# vim: tabstop=4 expandtab shiftwidth=4 diff -r b995d1bfbb69 -r 76d2b279896c examples/BaseHTTPRequestHandler/SimpleWithLoginApp.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/BaseHTTPRequestHandler/SimpleWithLoginApp.py Sun May 30 15:33:55 2004 +0000 @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +from WebStack.Adapters import BaseHTTPRequestHandler +from Simple import SimpleResource +from LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator +import BaseHTTPServer + +# Special magic incantation. + +handler = BaseHTTPRequestHandler.HandlerFactory( + LoginRedirectResource( + login_url="http://localhost:8081", + app_url="http://localhost:8080", + resource=SimpleResource(), + authenticator=LoginRedirectAuthenticator(secret_key="horses"), + anonymous_parameter_name="anonymous" + ) +) +address = ("", 8080) +server = BaseHTTPServer.HTTPServer(address, handler) +print "Serving..." +server.serve_forever() + +# vim: tabstop=4 expandtab shiftwidth=4