<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dr Nic &#187; OpenID</title>
	<atom:link href="http://drnicwilliams.com/category/openid/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Sat, 12 Nov 2011 01:05:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?</title>
		<link>http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/</link>
		<comments>http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 23:19:18 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Essay]]></category>
		<category><![CDATA[OpenID]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/</guid>
		<description><![CDATA[This article has no code in it. There are no TODO steps. Nothing to install. Its a picture of the future. There is no reason to bookmark this article and read it another day. Its nearly all pictures. You can read it now. This &#8220;picture of the future&#8221; was actually added to our browsers in [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/' rel='bookmark' title='Permanent Link: Why supporting multiple OpenIDs per User is useful for users&#8230;'>Why supporting multiple OpenIDs per User is useful for users&#8230;</a> <small>Web apps/services go down for maintenance (expected or erroneously) all...</small></li><li><a href='http://drnicwilliams.com/2007/08/03/one-year-on-the-intertubes/' rel='bookmark' title='Permanent Link: One year on the InterTubes'>One year on the InterTubes</a> <small>Dumping thoughts onto the InterTubes, aka blogging, is fun. And...</small></li><li><a href='http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/' rel='bookmark' title='Permanent Link: Sample Rails app: multi-OpenIDs per user'>Sample Rails app: multi-OpenIDs per user</a> <small>Last time, on &#8220;Dr Nic loves OpenID&#8221;&#8230; Dr Nic had...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>This article has no code in it. There are no TODO steps. Nothing to install. Its a picture of the future.</p>
<p>There is no reason to bookmark this article and read it another day. Its nearly all pictures. You can read it now.</p>
<p>This &#8220;picture of the future&#8221; was actually added to our browsers in the 90s. Netscape and MSIE3.0 both had it. </p>
<p>&#8220;It&#8221; is Client Certificates, and to me to means &#8220;never logging on with username/password NOR OpenID ever again&#8221;. Zero Sign On. It must be better than the much-targetted Single Sign On.</p>
<h3>Client Certificates</h3>
<p>Firefox 2.0:</p>
<p><img src="http://img.skitch.com/20080221-cf2nn6qtgt2qdqp8pxhpq4ygdm.jpg" alt="no-certificates"/></p>
<p>Or on Safari/KeyChain:</p>
<p><img src="http://img.skitch.com/20080221-fk3y222sb89awjjsht1n1annbm.jpg" alt="Keychain Access - no certificates"/></p>
<p>Small problem: no website I&#8217;ve ever used has ever offered them, so I never knew they existed. I didn&#8217;t know what they did, nor as a web developer that I could create them for users <em>who&#8217;d never need to login again</em>.</p>
<p><a href="http://dataconstellation.com/blog/">Clifford Heath</a> showed me the light. On #roro irc channel, we were exploring how &#8220;Zero Sign On&#8221; might be implemented using ssh-keygen, and browser plugins etc. Clifford mentioned client certificates and then someone else mentioned that <a href="http://myopenid.com">MyOpenID</a> already supported them. [someone = <a href="http://here.the.ycros.be/">Michael Kedzierski</a>]</p>
<p>I already had an myopenid account, so raced over to explore the new world of certificates.</p>
<p>Under &#8220;Authentication Settings&#8221;:</p>
<p><img src="http://img.skitch.com/20080221-be27aeq3w3iuft9ut3ei16xse9.jpg" alt="myopenid-create-certificate"/></p>
<p>After submit:</p>
<p><img src="http://img.skitch.com/20080221-f7wdf319gafd2gq811nrdh91a5.jpg" alt="myopenid-creating-certificate-dialog"/></p>
<p>And then:</p>
<p><img src="http://img.skitch.com/20080221-i3bxh8fqt8wbgmjktuy4hkhda.jpg" alt="myopenid-certificate-creation-finished"/></p>
<p>Then feedback:</p>
<p><img src="http://img.skitch.com/20080221-fn12hy727es2htja6i4pgnpgd9.jpg" alt="SSL Client Certificates"/></p>
<p>So I thought to test out if &#8220;Zero Sign On&#8221; actually worked. Normally, after logging out you&#8217;d need to submit username/password or if a site supported OpenID (yes myopenid.com is an OpenID provider which is a bit circular but bear with me) you login by entering your OpenID url and pressing Enter. Either way, you&#8217;ve got work to do.</p>
<p>Instead, I clicked &#8220;Login&#8221; link on the home page, and was redirected immediately to:</p>
<p><img src="http://img.skitch.com/20080221-kg8ytqkj6qcjyysp4k81g1ae9x.jpg" alt="myopenid-login-uses-alternate-url"/></p>
<p><img src="http://img.skitch.com/20080221-k1xpmx26h6ik1sumbqfr45axat.jpg" alt="myopenid-signin-with-certificate-form"/></p>
<p>So it was still using cookies so that it could log me in immediately next time without clicking &#8220;login&#8221;, but either way, there is no username/password nor any other &#8220;type something here&#8221; login form. Just a &#8220;Remember Me&#8221; checkbox.</p>
<p>Finally, myopenid.com shows a log of your sign-in attempts:</p>
<p><img src="http://img.skitch.com/20080222-m9335axkxm76mpg9mbkcsnyjat.jpg" alt="recent activity"/></p>
<h3>Your sites and the future</h3>
<p>As a web developer, you can do one of two things to get some leverage of Client Certificates.</p>
<ol>
<li>Support OpenID as a login mechanism. Users with myopenid.com accounts (or other openid providers that support client certificates) will benefit from automatic login to their openid page and instant redirection to your site. You&#8217;ll also be able to help new users import their profile data to get them started quickly.</li>
<li>Implement Client Certificates yourself. I would have liked to have had a crack at this before posting about Client Certificates and all their sweet loveliness, but I didn&#8217;t. My bad. Instead, I found a nice step-by-step (plus comments with updates) on <a href="http://blogs.ittoolbox.com/security/investigator/archives/howto-securing-a-website-with-client-ssl-certificates-11500">implementing Client Certificates</a></li>
</ol>
<p>If you have/do implement Client Certificates in Ruby/Rails world, you&#8217;ll get a 1000 Happy Points from me if you open source it/blog about it. Happy Points are redeemable for Happiness in all countries.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/' rel='bookmark' title='Permanent Link: Why supporting multiple OpenIDs per User is useful for users&#8230;'>Why supporting multiple OpenIDs per User is useful for users&#8230;</a> <small>Web apps/services go down for maintenance (expected or erroneously) all...</small></li><li><a href='http://drnicwilliams.com/2007/08/03/one-year-on-the-intertubes/' rel='bookmark' title='Permanent Link: One year on the InterTubes'>One year on the InterTubes</a> <small>Dumping thoughts onto the InterTubes, aka blogging, is fun. And...</small></li><li><a href='http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/' rel='bookmark' title='Permanent Link: Sample Rails app: multi-OpenIDs per user'>Sample Rails app: multi-OpenIDs per user</a> <small>Last time, on &#8220;Dr Nic loves OpenID&#8221;&#8230; Dr Nic had...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>Why supporting multiple OpenIDs per User is useful for users&#8230;</title>
		<link>http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/</link>
		<comments>http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 21:13:16 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[OpenID]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/</guid>
		<description><![CDATA[Web apps/services go down for maintenance (expected or erroneously) all the time. What happens when your &#8220;sign on to all apps everywhere&#8221; OpenID server goes down for an hour? You might not be able to login to any site. Your users may not be able to log into YOUR app. MyOpenID is going down on [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/' rel='bookmark' title='Permanent Link: Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?'>Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?</a> <small>This article has no code in it. There are no...</small></li><li><a href='http://drnicwilliams.com/2007/08/12/magiccgi/' rel='bookmark' title='Permanent Link: MagicCGI shows OpenID user count'>MagicCGI shows OpenID user count</a> <small> In the last 20 days, 43 people have used...</small></li><li><a href='http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/' rel='bookmark' title='Permanent Link: Sample Rails app: multi-OpenIDs per user'>Sample Rails app: multi-OpenIDs per user</a> <small>Last time, on &#8220;Dr Nic loves OpenID&#8221;&#8230; Dr Nic had...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Web apps/services go down for maintenance (expected or erroneously) all the time. </p>
<p>What happens when your &#8220;sign on to all apps everywhere&#8221; OpenID server goes down for an hour? You might not be able to login to any site. </p>
<p><strong>Your users may not be able to log into YOUR app.</strong></p>
<p>MyOpenID is going down on the 12th of September (see below) for an hour.</p>
<p>Allowing them to login with <a href="http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/">multiple</a> <a href="http://drnicwilliams.com/2007/07/20/one-app-one-user-account-and-multiple-openids/">OpenIDs</a> might alleviate any difficulty users have using/buying your stuff.</p>
<p>Even if they have clicked &#8220;Allow Forever&#8221;, and it appears that they never revisit their OpenID provider again when logging into your site, they actually still do via the wonders of HTTP redirection, and those zippy quick InterTubes we take for granted.</p>
<p>Supporting multiple OpenIDs in your app isn&#8217;t much more effort than supporting one OpenID. You just need an extra table and a form for creating them. </p>
<p>The <a href="http://www.plaxo.com/api/openid_recipe">Plaxo article</a> on multiple OpenIDs per user kind of makes it all appear a bit daunting, IMO. </p>
<p>But with the sweet Ruby OpenID gem and starting points like <a href="http://www.bencurtis.com/archives/2007/07/openid-sample-application-updated/">Ben Curtis sample app</a> or my <a href="http://www.plaxo.com/api/openid_recipe">multiple-openid sample app</a>, it <strong>might take only a 1/2 day or a day to educate yourself about OpenID, and hack it in to one of your apps. </strong></p>
<p>Say, like your blog. Please.</p>
<blockquote><p>This is a notice that <a href="http://myopenid.com">MyOpenID</a> will be having a maintenance<br />
outage starting at 08:00 on 2007/09/12, Pacific Time.<br />
The outage may last as long as 60 minutes, but is expected<br />
to be considerably shorter.</p>
<p>The reason for this outage is:</p>
<p>&nbsp;&nbsp;&nbsp;Database upgrade</p>
<p>During the outage, the MyOpenID website may be unavailable or<br />
unresponsive, and users will be unable log into OpenID-enabled<br />
websites using their MyOpenID accounts.  The latest information about<br />
this and other MyOpenID events can always be found on<br />
<a href="http://janrain.com/blog/">http://janrain.com/blog/</a></p>
<p>We apologize for the inconvenience.  If you have any questions, please<br />
contact us at support@myopenid.com.</p></blockquote>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/' rel='bookmark' title='Permanent Link: Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?'>Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?</a> <small>This article has no code in it. There are no...</small></li><li><a href='http://drnicwilliams.com/2007/08/12/magiccgi/' rel='bookmark' title='Permanent Link: MagicCGI shows OpenID user count'>MagicCGI shows OpenID user count</a> <small> In the last 20 days, 43 people have used...</small></li><li><a href='http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/' rel='bookmark' title='Permanent Link: Sample Rails app: multi-OpenIDs per user'>Sample Rails app: multi-OpenIDs per user</a> <small>Last time, on &#8220;Dr Nic loves OpenID&#8221;&#8230; Dr Nic had...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>RailsRumble hates OpenID</title>
		<link>http://drnicwilliams.com/2007/09/11/railsrumble-hates-openid/</link>
		<comments>http://drnicwilliams.com/2007/09/11/railsrumble-hates-openid/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 12:27:13 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[OpenID]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2007/09/11/railsrumble-hates-openid/</guid>
		<description><![CDATA[There are 146 RailsRumble entrants. %w[rubygems hpricot open-uri].each { &#124;l&#124; require l } (Hpricot(open("http://vote.railsrumble.com"))/"div.app_summary").size # => 146 Voting starts Wednesday. I&#8217;ve viewed a dozen or so front pages, and they all look awesome. But to use any a lot of them (I think) you need to create an account. Unfortunately there are only 10 that [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/' rel='bookmark' title='Permanent Link: Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?'>Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?</a> <small>This article has no code in it. There are no...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/' rel='bookmark' title='Permanent Link: Why supporting multiple OpenIDs per User is useful for users&#8230;'>Why supporting multiple OpenIDs per User is useful for users&#8230;</a> <small>Web apps/services go down for maintenance (expected or erroneously) all...</small></li><li><a href='http://drnicwilliams.com/2007/08/12/magiccgi/' rel='bookmark' title='Permanent Link: MagicCGI shows OpenID user count'>MagicCGI shows OpenID user count</a> <small> In the last 20 days, 43 people have used...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>There are 146 <a href="http://vote.railsrumble.com/">RailsRumble</a> entrants. </p>
<pre syntax="ruby">
%w[rubygems hpricot open-uri].each { |l| require l }
(Hpricot(open("http://vote.railsrumble.com"))/"div.app_summary").size # => 146
</pre>
<p>Voting starts Wednesday. I&#8217;ve viewed a dozen or so front pages, and they all <strong>look awesome.</strong> But to <em>use</em> <del datetime="2007-09-11T21:23:41+00:00">any</del> a lot of them (I think) you need to create an account.</p>
<p>Unfortunately there are only 10 that used OpenID. (see <a href="http://pastie.textmate.org/96058">pastie</a> for code)</p>
<p>So for the other 136, you must now create usernames and accounts. Type your email and password 136 times.</p>
<p>UPDATE: <a href="http://rubybrigade.org/">RubyBrigade</a> (list of Ruby clubs), <a href="http://sakebar.railsrumble.com/">Sake Bar</a> (warehouse of Sake recipes), <a href="http://irksome.railsrumble.com/">Irksome</a> (irc log), <a href="http://opencbdb.railsrumble.com/">Open Comic Book Database</a>, <a href="http://pubbud.railsrumble.com/">PubBud</a>, <a href="http://relocatr.railsrumble.com">relocatr</a> and <a href="http://simplebucket.railsrumble.com/">Simplebucket</a> do not require any authentication (added below)</p>
<p>Bonus Update: <a href="http://jourdefete.railsrumble.com/facebook/">Jour de fête</a> is a Facebook app. So, in a manner of speaking, it qualifies &#8211; Facebook signon is its OpenID equivalent.</p>
<p>For your convenience, here are links to the 10 sites that you can easily log into and play around with, via OpenID:</p>
<div>
<div class="app_summary">
<h4>Soundbadge.Net</h4>
<div class="team_name">By: Captain Half/Byte And The Funky Maeshrooms</div>
<div class="app_description">Create a unique beat loop that sounds just like you, then wear it anywhere on and off the web.</p>
<p>A soundbagde is a gravatar like widget, only for sounds instead of graphics. The sounds are individually rendered, based on a personal questionaire.</p></div>
<p>                <a href="http://vote.railsrumble.com/teams/3">View Team Profile</a> |<br />
                <a href="http://beat.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a></p></div>
<div class="app_summary">
<h4>Hypertr</h4>
<div class="team_name">By: Babaka</div>
<div class="app_description">An app to connect different language speaking bloggers</div>
<p>                <a href="http://vote.railsrumble.com/teams/24">View Team Profile</a> |<br />
                <a href="http://hypertr.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a></p></div>
<div class="app_summary">
<h4>Linga</h4>
<div class="team_name">By: Army Of Monkeys</div>
<div class="app_description">&quot;Let your impressions Linga&quot;</p>
<p>The marketing description (a.k.a. nonsense):</p>
<p>Linga is a hypertext meta-universe in which we can all cavort and play.  Through the power of teh intertubes, and the the little truck-like links betwixt them, we provide c&#8230;</p></div>
<p>                <a href="http://vote.railsrumble.com/teams/31">View Team Profile</a> |<br />
                <a href="http://linga.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a></p></div>
<div class="app_summary">
<h4>Joglog</h4>
<div class="team_name">By: Gdynia Belfast</div>
<div class="app_description">The joglog is a simple, motivating running log. It provides good feedback on your training, allowing you to track dates, times, distances and many other parameters.</p>
<p>You may login as test:test to see real running data.</p></div>
<p>                <a href="http://vote.railsrumble.com/teams/55">View Team Profile</a> |<br />
                <a href="http://joglog.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a></p></div>
<div class="app_summary">
<h4>Admiteer</h4>
<div class="team_name">By: Skype Smilies</div>
<div class="app_description">In haiku:</p>
<p>hey, our band just got \<br />
a gig at a local stage \<br />
let&#8217;s sell some tickets \</p>
<p>+++++++++++++</p>
<p>In iambic pentameter:</p>
<p>This weekend we&#8217;ve been working &#8217;round the clock \<br />
to make this app functional and complete \<br />
Now as our labor com&#8230;</p></div>
<p>                <a href="http://vote.railsrumble.com/teams/74">View Team Profile</a> |<br />
                <a href="http://admiteer.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a>
  </div>
<div class="app_summary">
<h4>Painboard</h4>
<div class="team_name">By: Self Grasping Robots</div>
<div class="app_description">online photo editor and imageboard</div>
<p>                <a href="http://vote.railsrumble.com/teams/78">View Team Profile</a> |<br />
                <a href="http://paintboard.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a></p></div>
<div class="app_summary">
<h4>Geekhumour.Com</h4>
<div class="team_name">By: Sexy Migrations</div>
<div class="app_description">A site to collect together all those funny snippets people come accross on the web, and integrate them in to email .sigs, and other places. </p>
<p>Your ratings are searchable so you can use your highest rated snippets automatically on the site or via rss</p></div>
<p>                <a href="http://vote.railsrumble.com/teams/84">View Team Profile</a> |<br />
                <a href="http://geekhumour.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a></p></div>
<div class="app_summary">
<h4>Nourish</h4>
<div class="team_name">By: Team Integral</div>
<div class="app_description">Nourish allows users to create and track well designed, RSS driven newsletters. Publishers can mash-up more than one feed, specify timed delivery, and customize the email templates to make simple RSS-driven newsletters.</div>
<p>                <a href="http://vote.railsrumble.com/teams/109">View Team Profile</a> |<br />
                <a href="http://nourish.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a></p></div>
<div class="app_summary">
<h4>Fish4brains</h4>
<div class="team_name">By: Team O19s</div>
<div class="app_description">Send your fish swimming through the waters of your favorite social network, or the internet at large!  Don&#8217;t like what your fish finds?  Tweak it&#8217;s genetic code!</div>
<p>      <a href="http://vote.railsrumble.com/teams/108">View Team Profile</a> |<br />
      <a href="http://takemeaway.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a></p></div>
<div class="app_summary">
<h4>Researchr</h4>
<div class="team_name">By: Team Agador Sparticus</div>
<div class="app_description">Writing tool that helps you write research papers.  Lets you outline and structure your thoughts, then fill in the text.  Keeps track of bibliographic information and helps to format everything properly at the end.  Something like Scrivener, but hosted&#8230;</div>
<p>                <a href="http://vote.railsrumble.com/teams/146">View Team Profile</a> |<br />
                <a href="http://researcher.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a>
  </div>
</div>
<div class="app_summary">
<h4>Ruby Brigade</h4>
<div class="team_name">By: Paint It Red</div>
<div class="app_description">rubybrigade.org will be a geographically aware registry of ruby user groups across the world.</div>
<p>                <a href="http://vote.railsrumble.com/teams/65">View Team Profile</a> |<br />
                <a href="http://paintitred.vote.railsrumble.com">Try It Out! (Voting Starts Wednesday)</a>
  </div>
<p>(todo &#8211; <a href="http://jourdefete.railsrumble.com/facebook/">Jour de fête</a>, <a href="http://sakebar.railsrumble.com/">Sake Bar</a> (warehouse of Sake recipes), <a href="http://irksome.railsrumble.com/">Irksome</a> (irc log), <a href="http://opencbdb.railsrumble.com/">Open Comic Book Database</a>, <a href="http://pubbud.railsrumble.com/">PubBud</a>, <a href="http://relocatr.railsrumble.com">relocatr</a> and <a href="http://simplebucket.railsrumble.com/">Simplebucket</a>)</p>
<p>Note: if your site is using OpenID but my script didn&#8217;t pick it, let me know below and I&#8217;ll add it.</p>
<p>Having suggested that OpenID is the answer to the 146 signups that are required for 146 applications, I actually think I&#8217;d be even cooler for RailsRumble (or any other competition) to have a single-signon mechanism, that once you signup, it tells all 146 apps to create you an account and log you in. THAT would be useful.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/' rel='bookmark' title='Permanent Link: Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?'>Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?</a> <small>This article has no code in it. There are no...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/' rel='bookmark' title='Permanent Link: Why supporting multiple OpenIDs per User is useful for users&#8230;'>Why supporting multiple OpenIDs per User is useful for users&#8230;</a> <small>Web apps/services go down for maintenance (expected or erroneously) all...</small></li><li><a href='http://drnicwilliams.com/2007/08/12/magiccgi/' rel='bookmark' title='Permanent Link: MagicCGI shows OpenID user count'>MagicCGI shows OpenID user count</a> <small> In the last 20 days, 43 people have used...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2007/09/11/railsrumble-hates-openid/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>MagicCGI shows OpenID user count</title>
		<link>http://drnicwilliams.com/2007/08/12/magiccgi/</link>
		<comments>http://drnicwilliams.com/2007/08/12/magiccgi/#comments</comments>
		<pubDate>Sun, 12 Aug 2007 10:51:04 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[OpenID]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Trick]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2007/08/12/magiccgi/</guid>
		<description><![CDATA[In the last 20 days, 43 people have used OpenID to leave comments. That&#8217;s very cool. Corollary: add OpenID login to your blog. Even cooler &#8211; Dynamic counter The screen shot comes from the Comments form. If you look at the comments form in a week, month, year, the counter above have be changed from [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2007/10/28/showing-off-data-on-a-timeline/' rel='bookmark' title='Permanent Link: Showing off data on a timeline'>Showing off data on a timeline</a> <small>I&#8217;m still trying to justify my effort writing the MagicCGI...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/' rel='bookmark' title='Permanent Link: Why supporting multiple OpenIDs per User is useful for users&#8230;'>Why supporting multiple OpenIDs per User is useful for users&#8230;</a> <small>Web apps/services go down for maintenance (expected or erroneously) all...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/railsrumble-hates-openid/' rel='bookmark' title='Permanent Link: RailsRumble hates OpenID'>RailsRumble hates OpenID</a> <small>There are 146 RailsRumble entrants. %w[rubygems hpricot open-uri].each { |l|...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div>
<div style="float:right">
<a class="imagelink" href="http://drnicwilliams.com/wp-content/uploads/2007/08/openid_user_count.png" title="OpenID count"><img id="image220" src="http://drnicwilliams.com/wp-content/uploads/2007/08/openid_user_count.png" alt="OpenID count" /></a>
</div>
<p>In the last 20 days, <span id="openid_counter">43</span> people have used OpenID to leave comments. That&#8217;s very cool.</p>
<p><strong>Corollary</strong>: add OpenID login to your blog.</p>
<h2 id="even_cooler_dynamic_counter">Even cooler &#8211; Dynamic counter</h2>
<p>The screen shot comes from the Comments form.</p>
<p>If you look at the comments form in a week, month, year, the counter above have be changed from its original value 43.</p>
<p>No fancy WordPress plugins (I don&#8217;t <em>do</em> PHP)</p>
<p>No Apache tricks. (I don&#8217;t know any Apache tricks)</p>
</div>
<p>Instead with Javascript/HTML <em>attached</em> to JSON <em>attached</em> to a RubyCGI script <em>attached</em> to my WordPress database via ActiveRecords and some magic.</p>
<p>I call it <strong>MagicCGI</strong>. I also call it <strong>Frigging Scary</strong>.</p>
<p>Try the following:</p>
<pre>$ curl -v "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?table=wp_openid_identities&amp;action=count&amp;format=json"
&lt; Content-Type: txt/json
&lt;
43
</pre>
<p>Or some XML?</p>
<pre>$ curl -v "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?table=wp_openid_identities&amp;action=count&amp;format=xml"
&lt; Content-Type: txt/xml
&lt;
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;result&gt;
  &lt;count type="integer"&gt;43&lt;/count&gt;
&lt;/result&gt;
</pre>
<h2 id="raw_data">Raw data?</h2>
<pre>$ curl "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?table=wp_posts&amp;field=post_title&amp;limit=5&amp;order=post_title"
[{"attributes": {"post_title": "OpenID count"}},
 {"attributes": {"post_title": "MagicCGI shows OpenID user count"}},
 {"attributes": {"post_title": "map_by_method now works with ActiveRecord associations"}},
 {"attributes": {"post_title": "Feedburner"}},
 {"attributes": {"post_title": "One year on the InterTubes"}}
]
</pre>
<p>Getting kinda scary now, I think.</p>
<h2 id="ooh_just_how_much_magic">Ooh, just how much magic?</h2>
<p>Want a list of available tables to play with?</p>
<pre>$ curl "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?meta=tables"
[{table_name: 'wp_users'},...]
</pre>
<ul>
<li>add <code>&amp;format=xml</code> to XML output; JSON is default</li>
<li>add <code>&amp;meta=columns</code> to include the column schema definitions</li>
<li>add <code>&amp;table_name=wp_posts</code> for each table you want (instead of all the tables)</li>
</ul>
<p>E.g. to see the columns for <code>wp_posts</code> and no other table, in XML:</p>
<pre>$ curl "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?meta=tables&amp;meta=columns&amp;table_name=wp_posts&amp;format=xml"
</pre>
<p>A list of all urls and internal user_ids for users/OpenID users/registered commenters?</p>
<pre>$ curl "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?table=wp_users&amp;field=user_url&amp;field=id"
[{"attributes": {"id": "1", "user_url": "http://drnicwilliams.com"}}, ...
</pre>
<p>So, now we know Dr Nic = user id 1.</p>
<p>Oh oh oh, how about a list of comments for a specific user?</p>
<pre>$ curl "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?table=wp_comments&amp;user_id=1"
...comments by Dr Nic...
or
$ curl "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?table=wp_comments&amp;user_id=1&amp;action=count"
232
</pre>
<p>Dr Nic&#8217;s commented in his own blog 232 times? Out of how many comments?</p>
<pre>$ curl "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?table=wp_comments&amp;action=count"
963
</pre>
<p>Where are the user emails? Where are their passwords?</p>
<p><strong>Hidden!</strong> See below.</p>
<h2 id="callbacks">Callbacks?</h2>
<p>JSON URLs support <code>callback=someCallbackMethod</code> and/or <code>variable=someLocalVariable</code>.</p>
<pre>$ curl "http://drnicwilliams.com/cgi-bin/wp_drnicwilliams.cgi?table=wp_comments&amp;action=count&amp;callback=someMethod"
someMethod(963);
</pre>
<h2 id="what_does_wp_drnicwilliamscgi_look_like">What does <code>wp_drnicwilliams.cgi</code> look like?</h2>
<p>Something a little like this&#8230; </p>
<pre>#!/usr/local/bin/ruby
require 'magic_cgi'         # loads the render magic, model magic, and meta-model magic
include Render

require 'magic_cgi/config/wordpress'  # connect to DB using WordPress installation (wp-config.php)
MagicCGI::Config::Wordpress.establish_connection "/path/to/drnicwilliams/web/public"

# The following is defaulted for WordPress connections:
MagicCGI::Config.hidden_tables |= %w[wp_openid_nonces wp_openid_associations wp_usermeta wp_tla_rss_map wp_tla_data]
MagicCGI::Config.hidden_columns['wp_users'] = %w[user_email user_pass user_activation_key]
MagicCGI::Config.hidden_columns['wp_openid_identities'] = %w[hash]
MagicCGI::Config.hidden_columns['wp_comments'] = %w[comment_author_email comment_author_IP]
MagicCGI::Config.hidden_columns['wp_posts'] = %w[post_password]

render do |params|
  data = DbTable.from_params(params)
  data ||= begin
    table_name = params['table'].first || 'wp_users'
    model_name = ActiveRecord::Base.class_name(table_name)
    klass = MagicCGI::MagicModel.create_class(model_name, ActiveRecord::Base)
    klass.find_or_count_by_params(params)
  end
  data
end
</pre>
<h2 id="can_i_write_my_own_cgi_scripts_for_my_own_dbs">Can I write my own CGI scripts for my own DBs?</h2>
<p>Sure. Its a library called MagicCGI.</p>
<h2 id="what_is_magic_cgi">What is MagicCGI?</h2>
<p>Coming soon.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2007/10/28/showing-off-data-on-a-timeline/' rel='bookmark' title='Permanent Link: Showing off data on a timeline'>Showing off data on a timeline</a> <small>I&#8217;m still trying to justify my effort writing the MagicCGI...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/' rel='bookmark' title='Permanent Link: Why supporting multiple OpenIDs per User is useful for users&#8230;'>Why supporting multiple OpenIDs per User is useful for users&#8230;</a> <small>Web apps/services go down for maintenance (expected or erroneously) all...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/railsrumble-hates-openid/' rel='bookmark' title='Permanent Link: RailsRumble hates OpenID'>RailsRumble hates OpenID</a> <small>There are 146 RailsRumble entrants. %w[rubygems hpricot open-uri].each { |l|...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2007/08/12/magiccgi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Sample Rails app: multi-OpenIDs per user</title>
		<link>http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/</link>
		<comments>http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 14:57:00 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Announcement]]></category>
		<category><![CDATA[OpenID]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/</guid>
		<description><![CDATA[Last time, on &#8220;Dr Nic loves OpenID&#8221;&#8230; Dr Nic had watched a video by Simon Willison glorifying the delights of OpenID to some Googlers. Dr Nic decided that each User might like to link multiple OpenIDs to their application account. Of course, if a user wanted multiple accounts then they could use their different OpenIDs [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2010/03/15/using-coffeescript-in-rails-and-even-on-heroku/' rel='bookmark' title='Permanent Link: Using CoffeeScript in Rails and even on Heroku'>Using CoffeeScript in Rails and even on Heroku</a> <small>I&#8217;m pretty excited about CoffeeScript as a clean-syntax replacement for...</small></li><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<h2 id="lasttimeondrniclovesopenid...">Last time, on &#8220;Dr Nic loves OpenID&#8221;&#8230;</h2>
<blockquote>
<p>Dr Nic had watched a <a href="http://video.google.com/videoplay?docid=2288395847791059857">video</a> by <a href="http://simonwillison.net/">Simon Willison</a> glorifying the delights of OpenID to some Googlers.</p>
<p>Dr Nic decided that each User might like to link <a href="http://drnicwilliams.com/2007/07/20/one-app-one-user-account-and-multiple-openids" title="Dr Nic    &raquo; One App, One User Account and Multiple OpenIDs">multiple OpenIDs</a> to their application account.</p>
<p>Of course, if a user wanted multiple accounts then they could use their different OpenIDs to do that too.</p>
<p>All Dr Nic had to do now, was write some code&#8230;</p>
</blockquote>
<p><a class="imagelink" href="http://openid.net/" title="OpenId logo"><img id="image206" src="http://drnicwilliams.com/wp-content/uploads/2007/07/openid-logo.gif" alt="OpenId logo" /></a></p>
<h2 id="inthemean-whilst...">In the mean-whilst&#8230;</h2>
<p>Later that very same day, Dr Nic reads a tutorial by <a href="http://www.bloglines.com/blog/jsmarr/" title="Joseph Smarr's Blog - Powered By Bloglines">Joseph Smarr</a> at <a href="http://www.plaxo.com/" title="Plaxo">Plaxo</a> &#8211;  <a href="http://www.plaxo.com/api/openid_recipe" title="A Recipe for OpenID-Enabling Your Site">A Recipe for OpenID-Enabling Your Site</a>. He is joyed that Joseph had said the same thing:</p>
<blockquote>
<p>It&#8217;s a many-to-one relationship (each user can have multiple OpenIDs attached to their account,<br />
  but a given OpenID can only be claimed by a single user)</p>
</blockquote>
<p>&#8220;Champion!&#8221; Exclaims Dr Nic in the seclusion of his <strike>underground lair</strike> <strike>300m isolated tower</strike> kitchen.</p>
<p>This article also lays out an implementation plan. It is in excruciating detail, including table schemas, stylesheet snippets and form suggestions.</p>
<p>Dr Nic rubbed his hands together and gets busy&#8230;</p>
<p>[/end of 3rd person]</p>
<h2 id="sampleapp">Sample app</h2>
<p>As a developer, the only reason you wouldn&#8217;t want to support &#8220;multiple OpenIDs per User&#8221; is because it <em>is</em> a PITA to implement, in that its an administrative bonus feature for your app. Its not really adding any real uber value.</p>
<p>So I followed his instructions &#8211; more or less &#8211; an have created a <a href="http://drnicwilliams.com/svn/openid/demos/apps/openidauth_multiopenid/trunk/" title="sample app trunk">sample app</a>. The <a href="http://drnicwilliams.com/svn/openid/demos/apps/openidauth_multiopenid/trunk/README" title="README for app">README</a> includes a demonstration of the app. You can also download it as a <a href="http://drnicwilliams.com/wp-content/openid/demos/apps/openidauth_multiopenid-0.3.2.zip" class="class">ZIP</a> or <a href="http://drnicwilliams.com/wp-content/openid/demos/apps/openidauth_multiopenid-0.3.2.tgz" class="class">TAR</a> bundle.</p>
<p><a class="imagelink" href="http://drnicwilliams.com/wp-content/uploads/2007/07/multi-openid.png" title="User account with multiple OpenIDs"><img id="image214" src="http://drnicwilliams.com/wp-content/uploads/2007/07/multi-openid.png" alt="User account with multiple OpenIDs" /></a></p>
<p>Now you can add multiple OpenIDs per user and be lazy at the same time.</p>
<p>The app builds on top of Ben Curtis&#8217; <a href="http://www.bencurtis.com/archives/2007/03/rails-openid-and-acts-as-authenticated/" title="BenCurtis.com  &raquo; Rails, OpenID, and Acts as Authenticated">OpenID sample app</a>, and uses a variation of Ryan Bates&#8217; <a href="http://railscasts.com/" title="Railscasts - Free Ruby on Rails Screencasts">Railscasts</a> theme, because its sexy.</p>
<p>NOTE: The code is built for Rails Edge, but the two bundles do not include rails edge, so you need to <code>rake rails:freeze:edge</code> after unpacking it (all this and more in the <a href="http://drnicwilliams.com/svn/openid/demos/apps/openidauth_multiopenid/trunk/README" title="README for app">README</a>). If you want to work with Rails 1.2.3 gems, then.. um, I didn&#8217;t write a list of changes, but it might still work, I haven&#8217;t tested it. Ben&#8217;s original app was built for 1.2.3, so at its very heart it should still work. Perhaps.</p>
<h2 id="deviationsfromthejoesphstutorial">Deviations from the Joesph&#8217;s tutorial</h2>
<p>I want my users to be able to throw their OpenID around on any old page where they see an OpenID field. </p>
<p>That is, allow users to login or register with OpenID from either the &#8220;login&#8221; form or the &#8220;registration/signup&#8221; form. Within Rails, these are traditionally two separate controllers (<code>sessions</code> and <code>users</code> respectively).</p>
<p>So, I extracted out this functionality in to a module (helper <code>user_openids_helper</code>) and its used by the two controllers.</p>
<h2 id="howsitwork">How&#8217;s it work?</h2>
<p>Same way that Ben&#8217;s sample app worked, more or less, so read his article a couple times, then read through the source code for the multi-OpenID sample app. </p>
<p>I guess a couple tourist highlights might be:</p>
<ul>
<li><code>app/helpers/user_openids_helper.rb</code> &#8211; the extract fancy code</li>
<li><code>config/routes.rb</code> &#8211; we need more routes to support alternate callbacks from OpenID providers</li>
<li><code>sessions_controller.rb</code> and <code>users_controller.rb</code> &#8211; they are emptier and cleaner now</li>
<li><code>test\functionals\sessions_controller.rb</code> &#8211; at the bottom are some test cases for the login/registration features of <code>user_openids_helper</code></li>
</ul>
<p>So, grab your Code Camera&#8230;</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2010/03/15/using-coffeescript-in-rails-and-even-on-heroku/' rel='bookmark' title='Permanent Link: Using CoffeeScript in Rails and even on Heroku'>Using CoffeeScript in Rails and even on Heroku</a> <small>I&#8217;m pretty excited about CoffeeScript as a clean-syntax replacement for...</small></li><li><a href='http://drnicwilliams.com/2009/11/03/first-look-at-rails-3-0-pre/' rel='bookmark' title='Permanent Link: First look at rails 3.0.pre'>First look at rails 3.0.pre</a> <small> This article is out of date in some aspects....</small></li><li><a href='http://drnicwilliams.com/2009/10/07/rails-themes-can-remember-things/' rel='bookmark' title='Permanent Link: Rails themes can remember things'>Rails themes can remember things</a> <small>I was getting annoyed at having to remember all the...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2007/07/26/sample-app-rails-multiple-openids-per-user/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>One App, One User Account and Multiple OpenIDs</title>
		<link>http://drnicwilliams.com/2007/07/20/one-app-one-user-account-and-multiple-openids/</link>
		<comments>http://drnicwilliams.com/2007/07/20/one-app-one-user-account-and-multiple-openids/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 20:49:54 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Essay]]></category>
		<category><![CDATA[OpenID]]></category>
		<category><![CDATA[SocialOS]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/2007/07/20/one-app-one-user-account-and-multiple-openids/</guid>
		<description><![CDATA[Summary: Its the future, and its not Facebook. Learn it. I&#8217;ve just implemented OpenID sign-ons for a client site, as a compliment for the standard signup/login process, and I choose the following association: 1 x User account &#8212;> 0 or 1 x OpenID The OpenID value is a field on my User model/table. So I [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/' rel='bookmark' title='Permanent Link: Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?'>Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?</a> <small>This article has no code in it. There are no...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/' rel='bookmark' title='Permanent Link: Why supporting multiple OpenIDs per User is useful for users&#8230;'>Why supporting multiple OpenIDs per User is useful for users&#8230;</a> <small>Web apps/services go down for maintenance (expected or erroneously) all...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/railsrumble-hates-openid/' rel='bookmark' title='Permanent Link: RailsRumble hates OpenID'>RailsRumble hates OpenID</a> <small>There are 146 RailsRumble entrants. %w[rubygems hpricot open-uri].each { |l|...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p><strong>Summary:</strong> Its the future, and its not Facebook. Learn it.</p>
<p>I&#8217;ve just implemented OpenID sign-ons for a client site, as a compliment for the standard signup/login process, and I choose the following association:</p>
<p>1 x User account &#8212;> 0 or 1 x OpenID</p>
<p>The OpenID value is a field on my User model/table.</p>
<p>So I login with my OpenID and I get one application account. </p>
<p>Or similarly, if the User already has an account, there is a field on their User settings page for their OpenID. They can put in their LiveJournal or AOL OpenID URL (or from one of 3000+ OpenID providers) there, and they can now log into that account using either normal login, or OpenID login.</p>
<p>Great.</p>
<p>But then I was watching a <a href="http://video.google.com/videoplay?docid=2288395847791059857">GoogleTechTalk video</a> by <a href="http://simonwillison.net/">Simon Willison</a> and he gave the following Bonus Use of OpenID:</p>
<ol>
<li>User logs into a site using an AOL OpenID</li>
<li>The site can now send AOL IM messages to that user</li>
</ol>
<p>This is cool for two reasons:</p>
<ol>
<li>The site automagically derived information about the User &#8211; they are an AOL member, and their AOL username.</li>
<li>More importantly, it KNOWS the user is the owner of that AOL account. </li>
</ol>
<p>The site gets authentication of this information for free through the OpenID sign-in process &#8211; the user is redirected back to AOL&#8217;s OpenID page at which time the user has to prove they own the account thru AOL signin (or cookies).</p>
<p>So, back to my story.</p>
<p>My users can sign into my site with an AOL OpenID and prove they own an AOL IM account name.</p>
<p>What if they also have a LiveJournal account? LiveJournal URLs are all OpenID URLs too [<a href="#1-lj">1</a>]</p>
<p>If they signed in with LiveJournal OpenID then they could prove they have such an account and my site could do funky LiveJournal specific things&#8230; like&#8230; read the user&#8217;s blog for them&#8230; ok, this example is going nowhere.</p>
<p>But! What is your MSN/Live account had an OpenID associated with it? Or Google Account? Or Yahoo Account? All have IMs associated with them. OpenID login could prove ownership of that information.</p>
<p>But&#8230;</p>
<p>My user has already logged in with AOL OpenID.</p>
<p>Stupid 1-to-1 data model of User and OpenID. Bah!</p>
<p><strong>Solution</strong>: allow Users to have 0+ OpenIDs. Some quick refactoring and you&#8217;re done.</p>
<p>Your controller code (the standard Rails solutions for OpenID support use a <code>sessions</code> controller to manage the OpenID provider interactions will now have to do a small amount of extra work.</p>
<p>Small.</p>
<p>Like, you&#8217;ll need a table of known OpenIDs and a <code>belongs_to</code> foreign key to the User model/table.</p>
<p>Small.</p>
<p>But perhaps you are already doing this and I&#8217;m the only silly sausage around here.</p>
<p>Even if you don&#8217;t see the benefit of these use cases &#8211; trusting the information from the OpenID profile &#8211; here&#8217;s a more common use case I think we&#8217;ll find:</p>
<p>Users will want to sign-in with whichever OpenID makes them feel the happiest at the time.</p>
<blockquote><p>I&#8217;m feeling some AOL love today, I&#8217;ll use http://openid.aol.com/iamawesome</p></blockquote>
<blockquote><p>I&#8217;ll use iamawesome.myopenid.com here as its got my Age and Country setup already.</p></blockquote>
<p>And the poor user will instantly get 2 accounts with your application &#8211; on top of the account they already had. That&#8217;s 3 accounts.</p>
<p>Unless we do the following:</p>
<ul>
<li>Allow &#8220;new&#8221; OpenID sign-ins to select an existing application User account to connect to &#8211; don&#8217;t make the poor user feel stupid for using OpenID &#8211; help them connect it to their existing information.</li>
<li>As above, allow multiple OpenIDs to be connected to each User account</li>
</ul>
<p>OpenID allows its Providers to return additional information beyond [name, email, etc] [<a href="#2-openid">2</a>]. So different OpenID profiles might store different bonus information.</p>
<p>AOL might expose my AOL buddies list.</p>
<p>LiveJournal might expose my LiveJournal buddies.</p>
<p>A user could login to your app with both OpenIDs, connect it to one User account, and re-use all their buddies within your app.</p>
<p>Its awesome, and its the &#8220;Social OS&#8221; that everyone&#8217;s harping on about. </p>
<p>Its the future. And its not Facebook.</p>
<p><a name="1-lj" /><br />
[1] [History lesson] Live Journal &#8211; <a href="http://www.sixapart.com/about/history">now owned</a> by <strike>A List Apart</strike><a href="http://www.sixapart.com/">Six Apart</a> &#8211; invented OpenID. [/History Lesson]</p>
<p><a name="2-openid" /><br />
[2] Through a draft specification <a href="http://openid.net/specs.bml">OpenID Attribute Exchange</a>; very nifty indeed as the raw OpenID1.1 spec has very limited profile data sharing. Like none.</p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/02/22/zero-sign-on-with-client-certificates/' rel='bookmark' title='Permanent Link: Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?'>Zero Sign On &#8211; 1 better or Infinitely better than Single Sign On?</a> <small>This article has no code in it. There are no...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/myopenid-goes-down-multiple-openids-useful/' rel='bookmark' title='Permanent Link: Why supporting multiple OpenIDs per User is useful for users&#8230;'>Why supporting multiple OpenIDs per User is useful for users&#8230;</a> <small>Web apps/services go down for maintenance (expected or erroneously) all...</small></li><li><a href='http://drnicwilliams.com/2007/09/11/railsrumble-hates-openid/' rel='bookmark' title='Permanent Link: RailsRumble hates OpenID'>RailsRumble hates OpenID</a> <small>There are 146 RailsRumble entrants. %w[rubygems hpricot open-uri].each { |l|...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2007/07/20/one-app-one-user-account-and-multiple-openids/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

