1.1 --- a/examples/Common/LoginRedirect/__init__.py Sat May 29 23:55:48 2004 +0000
1.2 +++ b/examples/Common/LoginRedirect/__init__.py Sun May 30 14:40:18 2004 +0000
1.3 @@ -2,7 +2,7 @@
1.4
1.5 "Login redirection."
1.6
1.7 -import md5
1.8 +from WebStack.Helpers.Auth import get_token
1.9
1.10 class LoginRedirectResource:
1.11
1.12 @@ -74,10 +74,9 @@
1.13
1.14 # Test the token from the cookie against a recreated token using the
1.15 # given information.
1.16 - # NOTE: This should be moved into a common library.
1.17
1.18 username, code = cookie.value.split(":")
1.19 - if code == md5.md5(username + self.secret_key).hexdigest():
1.20 + if cookie.value == get_token(username, self.secret_key):
1.21
1.22 # Update the transaction with the user details.
1.23