<?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>Andy Boyko says things to you &#187; openid</title>
	<atom:link href="http://andy.boyko.net/tag/openid/feed/" rel="self" type="application/rss+xml" />
	<link>http://andy.boyko.net</link>
	<description></description>
	<lastBuildDate>Tue, 27 Oct 2009 17:18:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>An OpenID, via WordPress/phpMyId, on Dreamhost</title>
		<link>http://andy.boyko.net/2007/12/10/an-openid-via-wordpressphpmyid-on-dreamhost/</link>
		<comments>http://andy.boyko.net/2007/12/10/an-openid-via-wordpressphpmyid-on-dreamhost/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 05:35:12 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://andy.boyko.net/?p=4</guid>
		<description><![CDATA[Returning to this venue, after long hiatus: hi! Today&#8217;s topic: So You Want To Get You One Of Them OpenIDs. And, you&#8217;re the sort of rugged DIY nerdo who hosts his own sites; and, you&#8217;re the sort of cheapskate who uses Dreamhost to do it. And, in a further creepy emulation of me, you run [...]]]></description>
			<content:encoded><![CDATA[<p>Returning to this venue, after long hiatus: hi!  </p>
<p>Today&#8217;s topic: So You Want To Get You One Of Them <a href="http://openid.net/">OpenIDs</a>.  And, you&#8217;re the sort of rugged DIY nerdo who hosts his own sites; and, you&#8217;re the sort of cheapskate who uses <a href="http://dreamhost.com/">Dreamhost</a> to do it.  And, in a further creepy emulation of me, you run your own <a href="http://wordpress.org/">WordPress</a>, *and* you have stumbled through just enough text on OpenID to understand that you were stymied enough to google for a page very much like this one.  In which case: hi!</p>
<p>The specific case I&#8217;m addressing is that you host your own WordPress, perhaps named similarly to <code>http://andy.boyko.net/</code>, and you&#8217;d prefer, for whatever misguided reason, to use that same fine URI as your OpenID, and that furthermore you&#8217;re not afraid of 15 minutes of fiddling for its own sake.  This will *not* help, in any way that I can discern, if you want to allow people visiting your WordPress installation to log in with their own OpenIDs in order to comment.  I gather there are WordPress plugins to help you achieve that; I surely haven&#8217;t tried them yet (because, really, my focus at this moment is on making life easier for me, not any of you) but I imagine those plugins would work in tandem with what you do in the following steps.</p>
<p>If you&#8217;re not using Dreamhost, maybe you just want a general explanation on what to do, such as those provided by <a href="http://intertwingly.net/blog/2007/12/05/phpMyId-0-7">Sam Ruby</a> or <a href="http://simonwillison.net/2006/Dec/19/openid/">Simon Willison</a>.  This explanation is mostly lifted from their work, modulo the Dreamhost-isms.</p>
<p>But so we&#8217;ll assume this:</p>
<ul>
<li> you&#8217;re a Dreamhost user, running your own WordPress instance under its own domain or subdomain (e.g. &#8216;myblog.com&#8217;, &#8216;andy.boyko.net&#8217;)</li>
<li> you understand Dreamhost&#8217;s <a href="http://panel.dreamhost.com/">Panel</a> sufficiently to add a new domain</li>
<li> you have shell access </li>
<li> you only care about a one-person solution</li>
<li> you&#8217;re not afraid </li>
</ul>
<p>Do these things:</p>
<ul>
<li> In the <a href="http://panel.dreamhost.com/">Dreamhost panel</a>, create a new subdomain on your blog&#8217;s domain, which will host the <a href="http://siege.org/projects/phpMyID/">phpMyID</a> tool, which is the secret sauce here, providing you with an &#8220;OpenID provider&#8221;, if I get the jargon right.  Note that you won&#8217;t use the name of this subdomain that you choose here directly, though it will appear buried in HTML tags in your site.  Given a WordPress instance at <code>andy.boyko.net</code>, I chose to create the subdomain &#8216;openid.andy.boyko.net&#8217; for this purpose, though its name needn&#8217;t relate to your WordPress&#8217;s URL.  I&#8217;ll refer to this new OpenID provider subdomain as <code>openid.yourblog.domain</code>.</li>
<li>Get a copy of <a href="http://siege.org/projects/phpMyID/">phpMyID</a> (version 0.7 at this writing; newer versions may invalidate some of this instruction) and unpack the .tar.gz file into your home directory, resulting in  <code>~/phpMyID-0.7/</code>
</li>
<li>You need three files from the unpacked phpMyID package in the newly created directory for the OpenID subdomain, <code>~/openid.yourblog.domain/</code>:<br />
<code><br />
cp ~/phpMyID-0.7/MyID.php ~/openid.yourblog.domain/<br />
cp ~/phpMyID-0.7/MyID.config.php ~/openid.yourblog.domain/index.php<br />
cp ~/phpMyID-0.7/htaccess ~/openid.yourblog.domain/.htaccess<br />
</code></li>
<li>Edit the <code>.htaccess</code> file, and uncomment the first of the three provided solutions &#8212; since PHP runs as a CGI on Dreamhost, you need mod_rewrite trickery to overcome some problem or over.  Just accept it.
 </li>
<li>Follow the phpMyID README configuration, so that you create a new MD5 hash for your password, and update the index.php file accordingly with your new name and the resulting password hash.  (Create the hash as instructed in the README, through &#8216;<code>openssl md5</code>&#8216;.)
</li>
<li> To preclude a baffling HTTP redirection loop later, trust the impossibly wise Sam Ruby, and add this line:<br />
<code><br />
 	'idp_url'       =>      'http://openid.yourblog.domain/',<br />
</code><br />
 to the <code>$GLOBALS['profile']</code>  hash, along with the username, password, and realm.
</li>
<li>Follow the README&#8217;s advices and test the installation of phpMyID, which at this point should be substantially complete, by visiting <code>http://openid.yourblog.domain/</code> and logging in.  Apparently, it is not unreasonable to be confident that this is OK despite not being SSL-encrypted, because of the use of digested authentication.  Go with that.  Prove that you&#8217;re able to log yourself in with the password you provided.  You&#8217;re now done fiddling with the installation of phpMyID, and you can leave this new subdomain alone.
</li>
<li> Well, before you leave it alone, take one more peek at the index.php configuration, and because you&#8217;re a savvy self-starting soul, and you realize the implications of the <code>$GLOBALS['sreg']</code> array, you might as well populate it with as much boilerplate personal info (e.g. full name, nickname, location) as you&#8217;re comfortable automatically transmitting to various Web-two-dot-zero entrepreneur types; minimal testing suggests those sites will helpfully pull that data in for you when you establish a new account after having logged in via OpenID.
</li>
<li>Now, head over to your WordPress, and bolt this new OpenID provider into it, by editing your chosen template (via &#8216;Presentation&#8217;/'Theme Editor&#8217;).  Specifically, crack open the &#8216;header&#8217; and, right before the closing <code>&lt;/head&gt;</code> tag, insert this voodoo boilerplate:<br />
<code><br />
&lt;link rel="openid.server" href="http://openid.yourblog.domain/"&gt;<br />
&lt;link rel="openid.delegate" href="http://openid.yourblog.domain/"&gt;<br />
</code><br />
The wise Mr. Ruby suggests that, by adding the <code>idp_url</code> config above, the second (visibly redundant) line becomes unnecessary, but I&#8217;m too lazy to even bother eliding it.  Note that there&#8217;s apparently a WordPress plugin that achieves the same one-or-two-line patch without you having to hand-tweak the HTML head, which might be preferable, but I haven&#8217;t investigated.
</li>
</ul>
<p>Anyhow, upon saving that change to your header, you should find that by simply providing the URI for your WordPress installation to the various &#8216;Web-two-dot-zero&#8217; sites that offer an OpenID login option, those sites will do the right thing, reading the &#8220;link rel=&#8221; tag and as a result contacting your new minimal phpMyID-based OpenID provider.  And, apparently, this is all OK.</p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://andy.boyko.net/2007/12/10/an-openid-via-wordpressphpmyid-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

