# HG changeset patch # User paulb # Date 1076276985 0 # Node ID e6f8e93053a0f96d5bca4d2cb607ea741b1b107f # Parent 4c129bbd4503e004cf42791968c4387327786a57 [project @ 2004-02-08 21:49:45 by paulb] Added the Auth example for Webware 0.8.1 and earlier. diff -r 4c129bbd4503 -r e6f8e93053a0 examples/Webware/AuthApp/Properties.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/AuthApp/Properties.py Sun Feb 08 21:49:45 2004 +0000 @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +name = "Auth" + +version = (0, 1, 0) + +status = "alpha" + +releaseDate = "?" + +requiredPyVersion = (2, 2, 0) + +synopsis = "A simple WebStack application." + +# vim: tabstop=4 expandtab shiftwidth=4 diff -r 4c129bbd4503 -r e6f8e93053a0 examples/Webware/AuthApp/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/Webware/AuthApp/__init__.py Sun Feb 08 21:49:45 2004 +0000 @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +""" +Webware plug-in code. +""" + +__version__ = "0.1" + +from WebStack.Adapters.Webware import WebStackServletFactory +from Auth import AuthResource + +# NOTE: Initialising a shared resource. + +resource = AuthResource() + +def InstallInWebKit(appServer): + global resource + app = appServer.application() + + # NOTE: Allow .auth files only. Really, we'd like any kind of file, but + # NOTE: that would severely undermine the servlet factory concept. + + app.addServletFactory(WebStackServletFactory(app, resource, [".auth"])) + +# vim: tabstop=4 expandtab shiftwidth=4