1 #!/usr/bin/env python 2 3 """ 4 Webware plug-in code. 5 """ 6 7 __version__ = "0.1" 8 9 from WebStack.Adapters.Webware import WebStackServletFactory 10 from Auth import AuthResource, AuthAuthenticator 11 12 # NOTE: Initialising a shared resource. 13 14 resource = AuthResource() 15 authenticator = AuthAuthenticator() 16 17 def InstallInWebKit(appServer): 18 global resource, authenticator 19 app = appServer.application() 20 21 # NOTE: Allow .auth files only. Really, we'd like any kind of file, but 22 # NOTE: that would severely undermine the servlet factory concept. 23 24 app.addServletFactory(WebStackServletFactory(app, resource, [".auth"], authenticator)) 25 26 # vim: tabstop=4 expandtab shiftwidth=4