1.1 --- a/examples/Common/Login/__init__.py Sat May 29 23:55:48 2004 +0000
1.2 +++ b/examples/Common/Login/__init__.py Sun May 30 14:40:18 2004 +0000
1.3 @@ -3,7 +3,7 @@
1.4 "An example login screen."
1.5
1.6 import WebStack.Generic
1.7 -import md5
1.8 +from WebStack.Helpers.Auth import get_token
1.9
1.10 class LoginResource:
1.11
1.12 @@ -128,11 +128,10 @@
1.13 if (username, password) in self.credentials:
1.14
1.15 # Make a special cookie token.
1.16 - # NOTE: This should be moved into a common library.
1.17
1.18 trans.set_cookie_value(
1.19 self.cookie_name,
1.20 - username + ":" + md5.md5(username + self.secret_key).hexdigest()
1.21 + get_token(username, self.secret_key)
1.22 )
1.23
1.24 return 1