2007-11-12 | paulb | file changeset files shortlog | [project @ 2007-11-12 00:51:34 by paulb] Added a StringResource class for simple static resources. Introduced base classes for common authentication activities. Merged "app", "path" and "qs" fields into a single "app" field for login and redirection. Added support for OpenID authentication. |
paulb@307 | 1 | #!/usr/bin/env python |
paulb@307 | 2 | |
paulb@570 | 3 | # Uncomment and adjust the paths below if WebStack is not installed somewhere |
paulb@570 | 4 | # on the PYTHONPATH. |
paulb@307 | 5 | |
paulb@570 | 6 | #import sys |
paulb@570 | 7 | #sys.path.append("/home/paulb/Software/Python/WebStack") |
paulb@570 | 8 | #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") |
paulb@307 | 9 | |
paulb@668 | 10 | from WebStack.Adapters.WSGI import deploy_as_cgi |
paulb@307 | 11 | from WebStack.Resources.Login import LoginResource, LoginAuthenticator |
paulb@307 | 12 | |
paulb@668 | 13 | deploy_as_cgi( |
paulb@325 | 14 | LoginResource( |
paulb@325 | 15 | LoginAuthenticator( |
paulb@325 | 16 | secret_key="horses", |
paulb@325 | 17 | credentials=( |
paulb@325 | 18 | ("badger", "abc"), |
paulb@325 | 19 | ("vole", "xyz"), |
paulb@325 | 20 | ) |
paulb@307 | 21 | ) |
paulb@718 | 22 | ), |
paulb@718 | 23 | handle_errors=0 |
paulb@307 | 24 | ) |
paulb@307 | 25 | |
paulb@307 | 26 | # vim: tabstop=4 expandtab shiftwidth=4 |