How to Be Your Own OpenID Provider and Use Your blog’s URL for Identification

OpenID logo If you have a self-hosted blog, meaning that you have the access to the files on the server, then implementing OpenID might be the greatest way to help your readers and yourself.

If you haven’t heard about the OpenID before, then in a nutshell it is your universal login name, which you can use to authenticate yourself on other blogs and websites without ever filling out those registration forms again. The illustration below shows how it works:

How OpenID works

How OpenID works

There are only three components involved: you and your OpenID indentifier which you have set up on your own OpenID Provider server.

However, keep in mind that in case you don’t have the access to a web server, you can still create an OpenID identifier at any of the Identity Providers such as Flickr, Blogger or Yahoo. You might even have one if you blog at WordPress.com. I strongly suggest that you read this excellent explanatory article by Sam Ruby to get a sense of how OpenID can work for you.

In this article I will show you how to:

  1. install a single user OpenID Identity Provider called phpMyID on your web server,
  2. configure your blog so that it’s URL is your OpenID identifier, and
  3. enable OpenID authentication on your blog, so that readers can use their OpenIDs to leave comments.

If you already have an OpenID account at one of the Identity Providers and you simply want be able to use your blog’s URL for authentication, skip the phpMyID installation part and go directly to step 3.

You will need:

  1. a blog powered by WordPress.
  2. a single user Identity Provider software called phpMyID developed by CJ Siege Niemira,
  3. WP-Yadis plugin created by Will Norris, to make the blog’s URL as your OpenID, and
  4. WP-OpenID plugin developed by Will Norris, Alan J Castonguay and Chris Messina to enable OpenID authentication for the blog.

Installation Guidelines

These instructions contain only the main points you should follow. If you want to have something configured differently than I have suggested, then feel free to do it.

  1. Download phpMyID and extract it somewhere on your computer. Notice that there are only two .php files and one .htaccess file to get things working.
  2. Read through the README file that is in the same package which you just extracted.
  3. Decide the URL you would like to use for the phpMyID identity provider. I am using konstruktors.com/id. Notice that this URL is used for placing the Identity Server only, and you will be still able to have the blog’s URL for authentication (after installing the WP-Yadis plugin).
  4. Edit and complete the MyID.config.php file as described in README and then rename MyID.config.php to index.php just before uploading it to the server. This way you’ll be able to use yourblogsurl.com/id instead of yourblogsurl.com/id/MyID.config.php in future.
  5. Go to the URL you chose previously and see if it works. If it doesn’t, try reading through the README file again a few times or download a fresh copy of phpMyID and start over. It should work. Move on to the next steps once you have got it working.
  6. You could use this URL for authenticating on any of the OpenID enable websites, but we want the blog’s URL, so let’s continue.
  7. Download WP-Yadis plugin, unzip it, upload it to the plugin folder of your WordPress installation, activate it, go to WordPress Settings and click on ‘Yadis’ in the menu.
  8. Let’s add the details for the Indentity Server we created in the previous step. Select Other in the drop-down menu. Username is the one you chose ('auth_username' => '...') when editing MyID.config.php file. Mine is kaspars. For OpenID Server enter the URL of your Identity Server http://yourblogsurl.com/id/ and for OpenID Delegate enter http://yourblogsurl.com/id/index.php
  9. Now you should be able to use your blog’s URL (http://yourblogsurl.com/blog) as your OpenID. Test it at openidenabled.com/resources/openid-test/diagnose-server. You should see ‘OK’ if everything is working correctly.
  10. Download WP-OpenID* plugin, extract it, upload it to the WordPress plugin folder, activate it and you should now see an OpenID icon in the background of the ‘Website’ input field in the comment form (when you are logged out). If you would also like to use OpenID for logging into the administration panel of your blog, go to ‘Users’ > ‘Your Identity URLs’ and add the URL of the Identification Server http://yourblogsurl.com/id/index.php.

Thats All. You now have a complete control over your identity on the Web, and your blog’s URL together with your name and e-mail address will be used automatically when leaving comments on other websites.

Notes & Known Problems

* Currently I am not using the WP-OpenID plugin because the JavaScript it uses for adding the input field’s background image seems to produce errors, but it might work well for you. I have got it working by simply removing the jquery.xpath.js file from the files directory inside the openid folder. It seems that the XPath compatibility provided by this file is now built into the jQuery core.

Therefore you can now test your OpenID by leaving a comment on this article.

If you experience any errors or problems, be sure to search through the WordPress Support forum and also consult the Google.

Never lose a single business lead or enquiry again! Get my latest plugin Storage for Contact Form 7 now!

Buy now for only $10 →

8 Comments

  1. Kaspars says:

    Great that I found a way to solve the JavaScript issues — its so much more convenient to use OpenID instead of name, URL and email separately.

  2. Evren Varol says:

    Thanks Kaspars, very nice article.

  3. Julian says:

    I followed the steps, using both wordpress and myopenid, but some sites just won’t recognise my openid.

    The check in step 9. fails as well.

    and on some sites it just works, I’m really confused and wondering what the problem could be.

  4. Julian says:

    Julian,

    oh boy, it’s working on this site, dunno. It’s getting stranger every time…

  5. Kaspars says:

    Julian, it seems that it’s all working fine here, so it must the problem on their end not yours. Also, don’t forget to add the http:// part if the login fails without it.

  6. Caleb Godwin says:

    Nice article. I think it got mine working, but, that’s why I’m leaving this comment!

  7. Spencer says:

    Are you still able to get Open ID to work? I see you’ve removed it from your site.

  8. Kaspars says:

    Yeah, I have removed the OpenID server from the site since I was not using it that much. Also the client part is gone because the plugin was causing too many issues with people not being able to leave comments although their URL was not an OpenID endpoint.

Leave a Reply