1 #!/usr/bin/env python 2 3 # NOTE: Path manipulation may require manual customisation. 4 5 import sys, os 6 sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common"))) 7 8 from WebStack.Adapters.ModPython import deploy 9 from WebStack.Resources.Login import LoginResource, LoginAuthenticator 10 11 # NOTE: Not sure if the resource should be maintained in a resource pool. 12 13 resource = LoginResource( 14 LoginAuthenticator( 15 secret_key="horses", 16 credentials=( 17 ("badger", "abc"), 18 ("vole", "xyz"), 19 ) 20 ), 21 use_redirect=0 22 ) 23 24 handler, _no_authentication = deploy(resource, handle_errors=1) 25 26 # vim: tabstop=4 expandtab shiftwidth=4