# HG changeset patch # User paulb # Date 1078013206 0 # Node ID 6c9002e004c9bb415d902dd5477735f76e6a6ab2 # Parent d53db0bc6ece207a060addee44a030b4d457cc5a [project @ 2004-02-29 00:06:46 by paulb] Added authenticator usage. diff -r d53db0bc6ece -r 6c9002e004c9 examples/ModPython/AuthApp/AuthHandler.py --- a/examples/ModPython/AuthApp/AuthHandler.py Sun Feb 29 00:06:37 2004 +0000 +++ b/examples/ModPython/AuthApp/AuthHandler.py Sun Feb 29 00:06:46 2004 +0000 @@ -7,14 +7,19 @@ sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") from WebStack.Adapters import ModPython -from Auth import AuthResource +from Auth import AuthResource, AuthAuthenticator # NOTE: Not sure if the resource should be maintained in a resource pool. resource = AuthResource() +authenticator = AuthAuthenticator() def handler(req): global resource - return ModPython.dispatch(req, resource, debug=1) + return ModPython.respond(req, resource, debug=1) + +def authenhandler(req): + global authenticator + return ModPython.authenticate(req, authenticator, debug=1) # vim: tabstop=4 expandtab shiftwidth=4