<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Rails, OpenID, and Acts as Authenticated</title>
	<atom:link href="http://www.bencurtis.com/2007/03/rails-openid-and-acts-as-authenticated/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bencurtis.com/2007/03/rails-openid-and-acts-as-authenticated/</link>
	<description>Speculations on Web Development by Benjamin Curtis</description>
	<lastBuildDate>Fri, 27 Aug 2010 13:20:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Bob</title>
		<link>http://www.bencurtis.com/2007/03/rails-openid-and-acts-as-authenticated/comment-page-1/#comment-1006</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Thu, 15 Mar 2007 04:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.bencurtis.com/archives/2007/03/rails-openid-and-acts-as-authenticated/#comment-1006</guid>
		<description>Ah - I missed all the hidden steps of installing the open_id_authentication plugin, running migrations, setting index_url, etc. It&#039;s still not clear in the code how one signs up with an OpenID URL - it takes more than simply adding an openid_url field in signup.rhtml

Thanks for clarifying this a bit; it&#039;s just demoralizing trying to tie together OpenID, one of a half-dozen authentication plugins/engines/schemes, and a straightforward authorization system. As usual, what ought to be a simple matter of installing a turnkey auth scheme is taking far more effort than the entire rest of the application. This has been true each of the three times I&#039;ve attempted a Rails application and I don&#039;t see things getting better overall...

If I can get some cooperation from the Austin on Rails group, I&#039;ll solve this problem for the next 6 months (until core Rails changes enough to deprecate key components without providing replacements - I&#039;m thinking of UserEngine...) and write it up so I&#039;m not accused of pointless bitching. :)</description>
		<content:encoded><![CDATA[<p>Ah &#8211; I missed all the hidden steps of installing the open_id_authentication plugin, running migrations, setting index_url, etc. It&#8217;s still not clear in the code how one signs up with an OpenID URL &#8211; it takes more than simply adding an openid_url field in signup.rhtml</p>
<p>Thanks for clarifying this a bit; it&#8217;s just demoralizing trying to tie together OpenID, one of a half-dozen authentication plugins/engines/schemes, and a straightforward authorization system. As usual, what ought to be a simple matter of installing a turnkey auth scheme is taking far more effort than the entire rest of the application. This has been true each of the three times I&#8217;ve attempted a Rails application and I don&#8217;t see things getting better overall&#8230;</p>
<p>If I can get some cooperation from the Austin on Rails group, I&#8217;ll solve this problem for the next 6 months (until core Rails changes enough to deprecate key components without providing replacements &#8211; I&#8217;m thinking of UserEngine&#8230;) and write it up so I&#8217;m not accused of pointless bitching. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolás Orellana, Entre viajes y Orelworks! &#187; Blog Archive &#187; Todo lo que tienes que saber sobre OpenID</title>
		<link>http://www.bencurtis.com/2007/03/rails-openid-and-acts-as-authenticated/comment-page-1/#comment-1005</link>
		<dc:creator>Nicolás Orellana, Entre viajes y Orelworks! &#187; Blog Archive &#187; Todo lo que tienes que saber sobre OpenID</dc:creator>
		<pubDate>Wed, 14 Mar 2007 23:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.bencurtis.com/archives/2007/03/rails-openid-and-acts-as-authenticated/#comment-1005</guid>
		<description>[...] Si trabajas en Rails existen muchos recursos e incluso una gema para lograrlo y también de como ajustarlo al famoso acts_as_authenticated. [...]</description>
		<content:encoded><![CDATA[<p>[...] Si trabajas en Rails existen muchos recursos e incluso una gema para lograrlo y también de como ajustarlo al famoso acts_as_authenticated. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.bencurtis.com/2007/03/rails-openid-and-acts-as-authenticated/comment-page-1/#comment-1003</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 12 Mar 2007 15:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.bencurtis.com/archives/2007/03/rails-openid-and-acts-as-authenticated/#comment-1003</guid>
		<description>@Geoff

Thanks for the tip.  I have updated the code in the post.</description>
		<content:encoded><![CDATA[<p>@Geoff</p>
<p>Thanks for the tip.  I have updated the code in the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff</title>
		<link>http://www.bencurtis.com/2007/03/rails-openid-and-acts-as-authenticated/comment-page-1/#comment-1002</link>
		<dc:creator>Geoff</dc:creator>
		<pubDate>Sun, 11 Mar 2007 23:05:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.bencurtis.com/archives/2007/03/rails-openid-and-acts-as-authenticated/#comment-1002</guid>
		<description>Instead of messing with the plugin code you can boil that whole case statement down if you use the OpenIdAuthentication::Result#successful? or OpenIdAuthentication::Result#unsuccessful? methods. Here is how I my open_id_authentication method looks. 

I don&#039;t know if this will layout right in the comment. Ben feel free to fix it for me ;)

&lt;code lang=&quot;ruby&quot;&gt;
def open_id_authentication
  authenticate_with_open_id do &#124;result, identity_url&#124;
    if result.successful?
      if self.current_user = User.find_or_create_by_identity_url(identity_url)
        successful_login
      else
        failed_login &quot;Sorry, no user by that identity URL exists (#{identity_url})&quot;
      end
    else
      failed_login result.message
    end
  end
end
&lt;/code&gt;

Thanks for the guide. Helped me integrate it with the RestfulAuthentication plugin.</description>
		<content:encoded><![CDATA[<p>Instead of messing with the plugin code you can boil that whole case statement down if you use the OpenIdAuthentication::Result#successful? or OpenIdAuthentication::Result#unsuccessful? methods. Here is how I my open_id_authentication method looks. </p>
<p>I don&#8217;t know if this will layout right in the comment. Ben feel free to fix it for me ;)</p>
<p><code lang="ruby"><br />
def open_id_authentication<br />
  authenticate_with_open_id do |result, identity_url|<br />
    if result.successful?<br />
      if self.current_user = User.find_or_create_by_identity_url(identity_url)<br />
        successful_login<br />
      else<br />
        failed_login "Sorry, no user by that identity URL exists (#{identity_url})"<br />
      end<br />
    else<br />
      failed_login result.message<br />
    end<br />
  end<br />
end<br />
</code></p>
<p>Thanks for the guide. Helped me integrate it with the RestfulAuthentication plugin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sol</title>
		<link>http://www.bencurtis.com/2007/03/rails-openid-and-acts-as-authenticated/comment-page-1/#comment-997</link>
		<dc:creator>sol</dc:creator>
		<pubDate>Sat, 10 Mar 2007 12:08:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.bencurtis.com/archives/2007/03/rails-openid-and-acts-as-authenticated/#comment-997</guid>
		<description>does anyone here know how one would do the registration for this?
DHH in his example with registration, checks for the identity_url in the user table, and if found, adds the user info.
So the users have to register their url before? I don&#039;t really understand this.
Wouldn&#039;t it be better to just add the identity if it is not existing, and update the details, on login if it is found?</description>
		<content:encoded><![CDATA[<p>does anyone here know how one would do the registration for this?<br />
DHH in his example with registration, checks for the identity_url in the user table, and if found, adds the user info.<br />
So the users have to register their url before? I don&#8217;t really understand this.<br />
Wouldn&#8217;t it be better to just add the identity if it is not existing, and update the details, on login if it is found?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
