Delegating your OpenID so it works with Wordpress Plugin

I recently installed the wp-openid plugin on this blog, to allow people to identify themselves with an OpenID in comments. One downside (pointed out by John) is that when you do this, your name above the comment will link to your OpenID URL rather than to your blog. Bummer!

So I deactivated the plugin and hunted around the Web for a solution. This post will explain the solution: how to delegate from your blog to your myopenid URL, so that in effect your blog URL becomes your OpenID URL. Once you've done this, you'll be able simply to enter your blog URL in the Website field of the comment form. Neat!

OpenID delegation works like this:

  1. You set up an OpenID URL at www.myopenid.com (or some other openid provider)

  2. You put some fancy code into the header of your blog that points openid authentication requests to the OpenID URL you set up already

  3. There is no step 3.


The fancy code should be as simple as this:
<link rel="openid.server" href="http://www.myopenid.com/server" />

<link rel="openid.delegate" href="http://robertjones.myopenid.com/" />

but unfortunately not all OpenID implementations seem to support this - some, including the wp-openid plugin, only recognise the more sophisticated YADIS format. Setting up YADIS involves putting something like this in the header:
<meta http-equiv="X-XRDS-Location" content="http://www.jonesieboy.co.uk/yadis.xml" />

along with a  matching yadis.xml file on your server that looks like:
<?xml version="1.0" encoding="UTF-8"?>

<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)"

xmlns:openid="http://openid.net/xmlns/1.0">

  <XRD>

  <Service priority="10">

  <Type>http://openid.net/signon/1.0</Type>

  <URI>http://www.myopenid.com/server</URI>

  <openid:Delegate>http://robertjones.myopenid.com/</openid:Delegate>

  </Service>

</XRD>

</xrds:XRDS>

If you are using Wordpress, the wp-yadis plugin takes care of the whole thing automatically. If not, you can get full details of how to set delegation up on Sam Ruby's blog: OpenID for non-SuperUsers.

As always, this technology is way too user-unfriendly now, but over the next few months I'm sure that euqivalents to the wp-yadis plugin will come along for most blogging platforms.

I'll post a couple of comments to this post to show the use of my myopenid URL and the use of this blog as a delegated openid.

Popular posts from this blog

Some Thoughts about Skills-Based Curricula

My Leadership Story

Knowing and Understanding in Mathematics