2009-11-27 | Paul Boddie | raw annotate files changeset graph | Changed authentication tokens to use UTF-8, not ISO-8859-1 which was presumably in use as a safe interpretation of bytes, but would not be appropriate as a target encoding for Unicode objects. Changed OpenID redirection to include the query string, although this should be tested with the example resources. Added HTML-level character set information for the OpenID identity examples, although python-openid's HTML parsing doesn't respect the encoding, at least in release 2.0.2. |
1 #!/usr/bin/env python 2 3 from WebStack.Adapters.Twisted import deploy 4 from WebStack.Resources.Login import LoginResource, LoginAuthenticator 5 6 print "Serving..." 7 deploy( 8 LoginResource( 9 LoginAuthenticator( 10 secret_key="horses", 11 credentials=( 12 ("badger", "abc"), 13 ("vole", "xyz"), 14 ) 15 ) 16 ), 17 address=("", 8081), 18 handle_errors=0 19 ) 20 21 # vim: tabstop=4 expandtab shiftwidth=4