
I love the way the Drupal handles account activation and password reset. The user just have to click a link that they receive via e-mail, and they are automatically logged in.
I wanted to do something similar with one of the applications I'm developing right now using TurboGears. I thought I would write a new identity provider, but instead went about hacking TurboGears. I noticed that TurboGears defualt soaprovider can be improved to seperate user authentication and marking a user as authenticated, hence making it reusable.
In my application's controller I use this newly introduced method to mark the user as authenticated. I thought someone else might hit the same problem, and blogged about it.
You can download the patch from http://mohanjith.net/downloads/scripts/python/TurboGears/1.0.4.3/soaprovider.diff, it is created against TurboGears 1.0.4.3.
Tuesday, February 26, 2008
Hacking TurboGears: Automatically loggin in users
Posted by
mohanjith
at
10:31
Labels: Python, TurboGears
Subscribe to:
Post Comments (Atom)













0 comments:
Post a Comment