1.1 --- a/README.txt Fri Aug 26 18:12:13 2005 +0000
1.2 +++ b/README.txt Tue Sep 06 17:35:33 2005 +0000
1.3 @@ -80,6 +80,10 @@
1.4 Added support for the repeated retrieval of sessions from the same WebStack
1.5 session store, avoiding deadlocks.
1.6 Fixed the calendar example, making it perform a proper function.
1.7 +Made the BaseHTTPRequestHandler SimpleWithLogin application include the Login
1.8 +application, since Konqueror (at least) does not share cookies across
1.9 +different port numbers on the same host.
1.10 +Added the SimpleWithLogin and Login applications to the demonstration.
1.11
1.12 New in WebStack 0.10 (Changes since WebStack 0.9)
1.13 -------------------------------------------------
2.1 --- a/examples/BaseHTTPRequestHandler/DemoApp.py Fri Aug 26 18:12:13 2005 +0000
2.2 +++ b/examples/BaseHTTPRequestHandler/DemoApp.py Tue Sep 06 17:35:33 2005 +0000
2.3 @@ -9,6 +9,8 @@
2.4
2.5 from WebStack.Adapters.BaseHTTPRequestHandler import deploy
2.6 from WebStack.Resources.ResourceMap import MapResource
2.7 +from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
2.8 +from WebStack.Resources.Login import LoginResource, LoginAuthenticator
2.9
2.10 # Here are all the test resources.
2.11
2.12 @@ -40,6 +42,7 @@
2.13 <li><a href="form">Form tests</a></li>
2.14 <li><a href="sessions">Session information</a></li>
2.15 <li><a href="simple">Simple test</a></li>
2.16 + <li><a href="simplewithlogin">Simple with login test</a></li>
2.17 <li><a href="unicode">Unicode test</a></li>
2.18 <li><a href="verysimple">Very simple test</a></li>
2.19 <li><a href="webdav://localhost:8080/calendar/">Calendar store example</a> - <strong>requires a WebDAV-capable browser</strong><br />
2.20 @@ -60,6 +63,25 @@
2.21 "form" : FormResource(),
2.22 "sessions" : SessionsResource(),
2.23 "simple" : SimpleResource(),
2.24 + "simplewithlogin" :
2.25 + LoginRedirectResource(
2.26 + login_url="http://localhost:8080/login",
2.27 + app_url="http://localhost:8080",
2.28 + resource=SimpleResource(),
2.29 + authenticator=LoginRedirectAuthenticator(secret_key="horses"),
2.30 + anonymous_parameter_name="anonymous",
2.31 + logout_parameter_name="logout"
2.32 + ),
2.33 + "login" :
2.34 + LoginResource(
2.35 + LoginAuthenticator(
2.36 + secret_key="horses",
2.37 + credentials=(
2.38 + ("badger", "abc"),
2.39 + ("vole", "xyz"),
2.40 + )
2.41 + )
2.42 + ),
2.43 "unicode" : UnicodeResource(),
2.44 "verysimple" : VerySimpleResource(),
2.45 "calendar" : CalendarResource(),
3.1 --- a/examples/BaseHTTPRequestHandler/SimpleWithLoginApp.py Fri Aug 26 18:12:13 2005 +0000
3.2 +++ b/examples/BaseHTTPRequestHandler/SimpleWithLoginApp.py Tue Sep 06 17:35:33 2005 +0000
3.3 @@ -2,18 +2,33 @@
3.4
3.5 from WebStack.Adapters.BaseHTTPRequestHandler import deploy
3.6 from WebStack.Resources.LoginRedirect import LoginRedirectResource, LoginRedirectAuthenticator
3.7 +from WebStack.Resources.Login import LoginResource, LoginAuthenticator
3.8 +from WebStack.Resources.ResourceMap import MapResource
3.9 from Simple import SimpleResource
3.10
3.11 print "Serving..."
3.12 deploy(
3.13 - LoginRedirectResource(
3.14 - login_url="http://localhost:8081",
3.15 - app_url="http://localhost:8080",
3.16 - resource=SimpleResource(),
3.17 - authenticator=LoginRedirectAuthenticator(secret_key="horses"),
3.18 - anonymous_parameter_name="anonymous",
3.19 - logout_parameter_name="logout"
3.20 - ),
3.21 + MapResource({
3.22 + "simple" :
3.23 + LoginRedirectResource(
3.24 + login_url="http://localhost:8080/login",
3.25 + app_url="http://localhost:8080",
3.26 + resource=SimpleResource(),
3.27 + authenticator=LoginRedirectAuthenticator(secret_key="horses"),
3.28 + anonymous_parameter_name="anonymous",
3.29 + logout_parameter_name="logout"
3.30 + ),
3.31 + "login" :
3.32 + LoginResource(
3.33 + LoginAuthenticator(
3.34 + secret_key="horses",
3.35 + credentials=(
3.36 + ("badger", "abc"),
3.37 + ("vole", "xyz"),
3.38 + )
3.39 + )
3.40 + )
3.41 + }),
3.42 handle_errors=1
3.43 )
3.44