Update: There are now excellent community-based and commercial implementations of Information Card code for WordPress, php, ruby, “C” and other languages. I've left this zip here for documentary and pedagogical purposes only.
I've been wanting to share my experiences adding Information Card support to identityblog for quite a while now. I just haven't had the time.
I started by publishing my work on building the necessary code for handling secure identity tokens. But then I got interrupted with the necessities of life – like shipping Cardspace.
Anyway, now I'm ready to present my integration code. Very little of it is unique to WordPress – it is really code that would in general apply just as much to any other piece of software. Someone could easily factor my code so the interface is a little cleaner than is currently the case.
When I had to actually alter wordpress files (only 3 of them), I just show the changes that are necessary. You'll have to download the original files from wordpress to see what I'm talking about (version 2.0.4) in context (usually not necessary unless you are making the changes in your own version.)
Download my contribution here. My assumption is that the root of this download is the same as the root of the wordpress directory.
[WARNING: DO NOT INSTALL THE WORDPRESS FILES FROM MY ZIP INTO YOUR OPERATIONAL WORDPRESS DIRECTORY! IF YOU WANTED TO USE THIS CODE, YOU WOULD NEED TO MANUALLY INTEGRATE THE CHANGES I HAVE MADE TO MY VERSION OF THE WORDPRESS FILES INTO YOUR VERSION OF THE SAME FILES.. THIS NO LONGER MAKES SENSE SINCE THERE ARE EXCELLENT (SUPPORTED!!) VERSIONS AVAILABLE. ]
The files all begin with “infocard” so they're easy to delete if you want to.
I'll be publishing a number of pieces explaining why I took the approaches it did. I hope this will get some good, concrete conversation going. The first in this series is uncharacteristically wordpress specific – don't get discouraged if you're looking for something more general. It talks about how I approached changing the wp-login page. I'm pretty sure that even people thinking about infocard-enabling other products will find some ideas here that help them out.
Like my previous work, you can use this code in whatever way you want. My goal is to help as many people as possible understand, use and deploy information cards.
UPDATE: Thanks to Samuel Rinnetmäki for pointing out the need to warn readers not to install “as is” in an operational directory – it had never occured to me they might do this… I've edited the ZIP to make this impossible (09-02-2008).