paulb@139 | 1 | #!/usr/bin/env python |
paulb@139 | 2 | |
paulb@139 | 3 | """ |
paulb@139 | 4 | Webware context for the Login application (post Webware 0.8.1). |
paulb@139 | 5 | """ |
paulb@139 | 6 | |
paulb@139 | 7 | from WebStack.Adapters.Webware import WebStackURLParser |
paulb@139 | 8 | from Login import LoginResource, LoginAuthenticator |
paulb@139 | 9 | |
paulb@139 | 10 | # NOTE: Initialising a shared resource. |
paulb@139 | 11 | |
paulb@139 | 12 | resource = LoginResource( |
paulb@139 | 13 | LoginAuthenticator( |
paulb@139 | 14 | secret_key="horses", |
paulb@139 | 15 | credentials=( |
paulb@139 | 16 | ("badger", "abc"), |
paulb@139 | 17 | ("vole", "xyz"), |
paulb@139 | 18 | ) |
paulb@148 | 19 | ), |
paulb@148 | 20 | anonymous_parameter_name="anonymous" |
paulb@139 | 21 | ) |
paulb@139 | 22 | |
paulb@139 | 23 | urlParser = WebStackURLParser(resource) |
paulb@139 | 24 | |
paulb@139 | 25 | # vim: tabstop=4 expandtab shiftwidth=4 |