Tuesday, December 18, 2007

Turn your blog Url to your OpenID

I'll go in a step by step way, so it's easy to pick it up.

Step 1:

Create your OpenID from an OpenID provider - for example I have the OpenID prabath.myopenid.com from myOpenID.com

Step 2:

So, now I have my OpenID, where I can use it to sign-in to any OpenID relying party. But, what if my OpenID provider shuts down business. I loose my OpenID.. :( The real issue here is I do not own my OpenID Url, that is prabath.myopenid.com.

Step 3:

To overcome the issue we found in Step 2, lets have our own blog Url, as our OpenID - so I own it.

In this case my blog Url is psiriwardena.blogspot.com. Let's see how we can map this to any OpenID aquired by any OpenID provider.

Step 4:

Go to your blog, edit the template and add the following two lines inside the <head></head> element.

<link href='http://www.myopenid.com/server' rel='openid.server'/>

<link href='http://prabath.myopenid.com/' rel='openid.delegate'/>

In the first line I set a reference to my OpenID provider. This value is common to all OpenIDs aquired from myOpenID.

In the second line I specify my OpenID, which I aquired from the myOpenID - so set this to your OpenID.

No we are done.

Step 5:

Now lets go to an OpenID relying party and when promted for the OpenID, I'll be typing psiriwardena.blogspot.com and I am done.

The benefit gain by this approach is, you can have one OpenID and can map it to any OpenID you obtained from any OpenID provider, whenever you want.

Enjoy!

0 comments: