Enable Your Blog or Website as Your OpenID Login

OpenID is your universal login name which server as single sign on (SSO) to authenticate yourself on other blogs and websites, without ever filling out those registration forms again. It is simply a URL that can be used to sign in to any website that supports OpenID. My openID is TECK.IN, that means I can login with this URL to any sites supporting OpenID.

How do I Get My Free OpenID?

If you are already signed up with blogger, wordpress.com, flickr, livejournal, yahoo, etc., you might already have your own OpenID. Otherwise you can signup with any of your preferred OpenID vendor. Check out the OpenID website.

How to Make My Blog / Website as My OpenID?

Even though I have account with all of the above providers, I use my account at LiveJournal – LJ who invented this. Now that I have an OpenID identity provided by LJ, I can simply turn my blog URL teck.in to be my own OpenID login URL.

All I have to do is to copy the following into the HEAD section of your blog or webpage, adjusting the two URIs as appropriate:

<link rel=”openid.server” href=”http://www.livejournal.com/openid/server.bml” />
<link rel=”openid.delegate” href=”http://your-lj-username.livejournal.com” />

Now I can use https://teck.in as the OpenID URL. The above lines in the HEAD section of the HTML will tell the OpenID consumer that, teck.in delegates the user validation to http://your-lj-username.livejournal.com and the live journal OpenID server to validate the sign-on is located at http://www.livejournal.com/openid/server.bml

You can use any of the OpenID providers as delegate by providing the OpenID URL and the server URL. Tomorrow If I want to use Yahoo or Blogger OpenID, I can simply change the provider and server in the HEAD section of TECK.IN, and my OpenID will stay the same – https://teck.in

[advt]

Setup Your Own OpenID Provider

Anyone can setup and run an OpenID server. If you want to, you can use phpMyID to setup your own single identity in your blog / website. But I personally prefer using the free services. Check out the very useful tutorial by Sam Ruby.

OpenID and WordPress Blogs

To convert your self hosted WordPress blog into an OpenID URL, you can follow the instructions given in the sections above. This can be done by editing the header file in most themes.

Since the OpenID reference is required only in the index (home) page of the blog URL, I use the following PHP code in the header.php

<?php if ( is_home() && $paged < 2 ) { ?>
<link rel=”openid.server” href=”http://www.livejournal.com/openid/server.bml” />
<link rel=”openid.delegate” href=”http://your-lj-username.livejournal.com” />
<?php } ?>

You have to change change the openid.server href value and openid.delegate href value according to your provider.

You may as well use the WP-Yadis plugin to achieve the same without messing up the theme and keep the OpenID functionality persistence through theme changes.

Enabling OpenID for Commenting in WordPress Blogs

I hope that next major release of WordPress will support OpenID for commenting built into the core WordPress distribution. It would also be great to have the ability to delegate to an OpenID provider so that the blog owner can use the blog url as an openid, without using any plugin or HEAD section change. Having this functionality built into WordPress would help the OpenID project get wider audience. I have decided to wait until that happens to enable OpenID commenting!

As of today, you can use plugins to enable open id commenting. You may use the WP-OpenID Plugin. This plugin allows verified OpenIDs to be linked to existing user accounts for use as an alternative means of authentication. Additionally, commenters may use their OpenID to assure their identity as the author of the comment.

4 Comments

  1. Nice article, lots of useful info. I work for a company called Vidoop and we have been working to make OpenID easier to use and more secure, our provider is myVidoop: http://myvidoop.com

    Specifically we want people to feel comfortable using OpenID for more high value transactions and so we have implemented a two factor authentication system. Without requiring any additional hardware or software we have a image based login system that generates a random passcode for every login. We also offer a password manager for storing/organizing your traditional logins and passwords, support OpenID delegation (very useful), have custom activity reports, and more. You can create an OpenID and check it out for free.

    It is also worthwhile to note that OpenID is only a component in the identity stack, there is an excellent description of everything that goes into someone’s identity beyond OpenID here: http://blogs.oracle.com/talkingidentity/2008/05/05

    Cheers,
    Kevin

Leave a Reply

Your email address will not be published.


*


eleven − 6 =