1.1 --- a/examples/ModPython/AuthApp/AuthHandler.py Sun Feb 29 00:06:37 2004 +0000
1.2 +++ b/examples/ModPython/AuthApp/AuthHandler.py Sun Feb 29 00:06:46 2004 +0000
1.3 @@ -7,14 +7,19 @@
1.4 sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common")
1.5
1.6 from WebStack.Adapters import ModPython
1.7 -from Auth import AuthResource
1.8 +from Auth import AuthResource, AuthAuthenticator
1.9
1.10 # NOTE: Not sure if the resource should be maintained in a resource pool.
1.11
1.12 resource = AuthResource()
1.13 +authenticator = AuthAuthenticator()
1.14
1.15 def handler(req):
1.16 global resource
1.17 - return ModPython.dispatch(req, resource, debug=1)
1.18 + return ModPython.respond(req, resource, debug=1)
1.19 +
1.20 +def authenhandler(req):
1.21 + global authenticator
1.22 + return ModPython.authenticate(req, authenticator, debug=1)
1.23
1.24 # vim: tabstop=4 expandtab shiftwidth=4