<entry xmlns:thr='http://purl.org/syndication/thread/1.0' xmlns='http://www.w3.org/2005/Atom'>
<id>tag:intertwingly.net,2004:2860</id>
<link href='http://intertwingly.net/blog/2008/06/23/OpenID-Check-on-Rails' rel='alternate'/>
<link href='http://intertwingly.net/blog/2860.atom' rel='replies' thr:count='0'/>
<title>OpenID Check on Rails</title>
<summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Looking at <a href='http://agilewebdevelopment.com/plugins/openidauthentication'>openidauthentication</a>, it seem to do everything <a href='http://www.intertwingly.net/blog/2006/12/28/Unobtrusive-OpenID'>I want</a>. Since I am looking to check an identity during the processing of a request, I need to somehow have the id of the unprocessed record tag alone with the identity request.</div></summary>
<content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'><svg viewBox='0 0 100 100' height='100' xmlns='http://www.w3.org/2000/svg' width='100'>
<path d='M43,90c-88,-16,-21,-86,41,-51l9,-6v17h-26l8,-5c-55,-25,-86,29,-32,36z' fill='#ccc'></path>
<path d='M43,90v-75l14,-9v75z' fill='#f60'></path>
</svg>
<p>Looking at <a href='http://agilewebdevelopment.com/plugins/openidauthentication'>openidauthentication</a>, it doesn’t seem to do everything <a href='http://www.intertwingly.net/blog/2006/12/28/Unobtrusive-OpenID'>I want</a>. Since I am looking to check an identity during the processing of a request, I don’t need a ‘login’, instead I need to somehow have the id of the unprocessed record tag alone with the identity request.</p>
<p>The <a href='http://www.danwebb.net/2007/2/27/the-no-shit-guide-to-supporting-openid-in-your-applications'>No Shit Guide</a> is quite a bit simpler, but is based on the <a href='http://openidenabled.com/ruby-openid/'>1.1.x version of the ruby-openid</a> library.</p>
<p><a href='http://intertwingly.net/stories/2008/06/23/openid_controller.rb'>This controller</a> contains a simpler pair of methods (one public, one protected) that does what I want and can easily be adapted. Simply drop these two methods into your favorite controller and modify the actions that are taken at the obvious points (DiscoveryFailure, success, failure, cancel, other). At the moment, all that is done is that the data is logged and/or stashed into a session, but it could easily be modified so that a failure or cancel could trigger moderation, or a required preview, or a captcha, or whatever.</p></div></content>
<updated>2008-06-23T15:20:57-04:00</updated>
<source xmlns:planet='http://planet.intertwingly.net/'><planet:Intertwingly>http://intertwingly.net/blog/index.atom</planet:Intertwingly><link href='http://intertwingly.net/blog/index.atom' rel='self'/><id>http://intertwingly.net/blog/index.atom</id><icon>http://intertwingly.net/favicon.ico</icon><title>Sam Ruby</title><subtitle>It’s just data</subtitle><author>
<name>Sam Ruby</name>
<email>rubys@intertwingly.net</email>
<uri>http://intertwingly.net/blog/</uri>
</author><updated>2008-06-27T10:49:16-04:00</updated><link href='http://intertwingly.net/blog/' rel='alternate'/><link href='http://creativecommons.org/licenses/BSD/' rel='license'/><link href='http://intertwingly.net/blog/index.atom' rel='self'/></source></entry>