2004-05-27 | paulb | raw annotate files changeset graph | [project @ 2004-05-27 22:18:00 by paulb] Added an example login redirect component which works with the example login server to provide common authentication for applications. |
1 #!/usr/bin/env python 2 3 from WebStack.Adapters import BaseHTTPRequestHandler 4 from Login import LoginResource, LoginAuthenticator 5 import BaseHTTPServer 6 7 # Special magic incantation. 8 9 handler = BaseHTTPRequestHandler.HandlerFactory( 10 LoginResource(LoginAuthenticator("horses")) 11 ) 12 address = ("", 8081) 13 server = BaseHTTPServer.HTTPServer(address, handler) 14 server.serve_forever() 15 16 # vim: tabstop=4 expandtab shiftwidth=4