{"id":47,"date":"2008-02-26T05:31:00","date_gmt":"2008-02-26T05:31:00","guid":{"rendered":"http:\/\/www.mohanjith.net\/wordpress\/?p=47"},"modified":"2008-02-26T05:31:00","modified_gmt":"2008-02-26T05:31:00","slug":"hacking-turbogears-automatically-loggin","status":"publish","type":"post","link":"https:\/\/mohanjith.net\/blog\/2008\/02\/hacking-turbogears-automatically-loggin.html","title":{"rendered":"Hacking TurboGears: Automatically loggin in users"},"content":{"rendered":"<p><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/www.turbogears.org\/static\/images\/g_gear.png\"><img decoding=\"async\" style=\"float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px;\" src=\"http:\/\/www.turbogears.org\/static\/images\/g_gear.png\" border=\"0\" alt=\"TurboGears\" \/><\/a><br \/>I love the way the <a href=\"http:\/\/drupal.org\">Drupal<\/a> 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.<\/p>\n<p>I wanted to do something similar with one of the applications I&#8217;m developing right now using <a href=\"http:\/\/www.turbogears.org\/\">TurboGears<\/a>. 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.<\/p>\n<p>In my application&#8217;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.<\/p>\n<p>You can download the patch from <a href=\"http:\/\/www.mohanjith.net\/downloads\/scripts\/python\/TurboGears\/1.0.4.3\/soaprovider.diff\">http:\/\/www.mohanjith.net\/downloads\/scripts\/python\/TurboGears\/1.0.4.3\/soaprovider.diff<\/a>, it is created against TurboGears 1.0.4.3.<\/p>\n<div id=\"fb-like\" style=\"\"><iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https:\/\/mohanjith.net\/blog\/2008\/02\/hacking-turbogears-automatically-loggin.html&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=&amp;colorscheme=light&amp;locale=en_US\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:300px; height:30px\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>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&#8217;m developing right now using TurboGears. I thought I would write a new &#8230; <a title=\"Hacking TurboGears: Automatically loggin in users\" class=\"read-more\" href=\"https:\/\/mohanjith.net\/blog\/2008\/02\/hacking-turbogears-automatically-loggin.html\" aria-label=\"More on Hacking TurboGears: Automatically loggin in users\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[88,110],"tags":[400,422],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-python","category-turbogears","tag-python","tag-turbogears"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5lUHm-L","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":0,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"wp:attachment":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}