A new feature in MT4 enables users to login via OpenID. This makes it easy to login to comment on MT4 blogs: simply enter your OpenID URL and you are good to go. But what if you don't have an OpenID. They are easy to get, but I thought it would be cool if you could use your own MT blog URL, and use your MT installation account to login to other MT sites to comment. That is exactly what the OpenID Server plugin enables you to do.
When I first set out to built an OpenID Server plugin for MT, I thought is was going to be a lot of work and steep learning curve. But then I discovered that such a plugin was previously created over 2 years ago for MT 3.2, created by Mark Paschal and Brad Choate of Six Apart. I merely moved things around a bit to suit MT4, made a few minor tweaks, and added a template tag to make it easy to setup. As such, 99% percent of the credit goes to Mark and Brad. I just thought it would be cool to login to other MT4 blogs using my MT install login account -- it kinda brings the whole OpenID thing full circle.
Screencast
Notice the URL in the address bar after I click the OpenID "Sign In" button:
Requirements
- MT4
- Net::OpenID::Server Perl Module (included)
Installation
- Extact the files from the zip file and upload the contents of the 'plugins' folder to the 'plugins' directory of your MT installation
- Upload the contents of the 'extlib' directory to the 'extlib' directory.
- Change the permissions on the /plugins/openid-server/server.cgi file to 755 (CHMOD 755)
- In your author profile, set your Website URL to the URL you wish to use as your OpenID profile URL.
- In the <head> section of that page, add the HTML tag:
- If your profile page is a static HTML page, replace "http://mt-hacks.com/cgi-bin/mt/" with the full CGIPath to the copy of Movable Type where the plugin is installed.
- To sign in with OpenID, when presented with an OpenID signon form, enter the URL to your
- profile URL. If you are not logged in to Movable Type, you will be prompted to log in.
<link rel="openid.server" href="<MTCGIPath>plugins/openid-server/server.cgi" />
OR (easier)
<$MTOpenIDHeader$>
Download Now
The OpenID Server plugin is free software.
Note: I probably should submit this version to code.sixapart.com, but I am not sure hwo to do that. I have never used Trac, nor contributed to any open source software before. I am not sure what the best practices are here, etc. I am sure somebody will point me in the right direction here...


Comments (17)
Most excellent, Mark, I had it on my list to update this as well. Glad to see that someone else beat me to it! One suggestion I'd make, however, just to make it easier for everyone to install, is to put the "Net" folder inside the "lib" folder in the distribution, rather than messing with the extlib.
It is true that MT ships with most of the files (though your version of Consumer.pm differs slightly from 4.01rc2), but it may cause some confusion. It doesn't seem to cause an issue to put the files into the plugin's lib, but if you're concerned about it, you could offer a version for MT3 (I'm not sure if it works with MT3) that includes those files, and a version for MT4 that includes only the Server.pm in the plugin's lib.
Other than that, nicely done!
Posted by Chad Everett | September 13, 2007 5:16 PM
Posted on September 13, 2007 17:16
Just one more update - it does work with MT3 (at least MT 3.35), which is something that the old one did not once MT4's user registration hit the scene (something in the redirection broke).
So you may want to change your plugin registration, since "OpenID Server for MT4" isn't technically accurate, and you might get more takers (of course, the template tag won't work since it's registered via the registry, but you could overcome that too, if you really want to).
Thanks again!
Posted by Chad Everett | September 13, 2007 5:22 PM
Posted on September 13, 2007 17:22
I really like this plugin, excellent work. I think I have something wrong though after I installed it when I login to another site it shows my website url as my name. Did I copy something wrong or miss a step somewhere?
Posted by wilpig
|
September 19, 2007 5:20 PM
Posted on September 19, 2007 17:20
Hi wilpig, that's the correct behaviour, I believe.
Posted by Ian Fenn | September 21, 2007 5:54 PM
Posted on September 21, 2007 17:54
Ian is correct. However, one way around this is to specify a FOAF file. In source of the home page for mt-hacks.com, you will see a <link reference in my <head that points to my FOAF file, which contains my real name and other profile information. The MT OpenID login will check to see if you have a FOAF file, and attempt the extract your real name from it. The key is to make sure that you place a reference to your FOAF on the same page as your OpenID URL. For more about FOAF, click here.
Posted by Mark Carey
|
October 5, 2007 4:30 PM
Posted on October 5, 2007 16:30
Some sites look like they're using the extension described here to get more information about the user's identity (nickname/full name/etc). Are you going to update the plugin to support that extension of the spec?
Glad to see this plugin's still being developed :)
Posted by Alden | December 2, 2007 9:31 PM
Posted on December 2, 2007 21:31
Alden,
I looked into supporting this, but I gave up after a while, due to a lack of documentation on how to do this with Perl. If you know of any docs or perl libraries that might, let me know...
Posted by Mark Carey
|
December 3, 2007 12:27 PM
Posted on December 3, 2007 12:27
Hi Mark, hope you're having a good break in Toronto. It's Christmas eve, and I'm thinking of installing this. I note that your extlib files are a bit different from the ones by the same name that are shipping with MTOS nightly (12/24/2007). Specifically:
-rw-r--r-- 1 fpgibson users 7369 May 30 2006 Association.pm
-rw-r--r-- 1 fpgibson users 6957 May 30 2006 ClaimedIdentity.pm
-rw-r--r-- 1 fpgibson users 29660 Aug 3 19:06 Consumer.pm
All of which are both older and possessing different file sizes than the latest ones from 6A:
-rw-r--r-- 1 fpgibson users 6840 Dec 11 20:47 Association.pm
-rw-r--r-- 1 fpgibson users 6750 Dec 11 20:47 ClaimedIdentity.pm
-rw-r--r-- 1 fpgibson users 28244 Dec 11 20:47 Consumer.pm
-rw-r--r-- 1 fpgibson users 6830 Dec 11 20:47 VerifiedIdentity.pm
So, it seems that all I might need from yours is Server.pm.
Posted by Bud Gibson | December 24, 2007 9:34 PM
Posted on December 24, 2007 21:34
Remarkably, it works if you only copy server.pm to the MTOS (4.1) extlib directory. One issue to explore, what if you have a multi-author blog and you're using this plug-in. Seems like it should work for all authors.
Posted by Bud Gibson | December 24, 2007 9:52 PM
Posted on December 24, 2007 21:52
Bud, the installation instructions above specifically state that it should be uploaded to the 'extlib' directory of MT (see step 2). So there is nothing remarkable about that ;)
As to your second point, it does work for all authors on the system. I am not sure where you got the impression that it doesn't.
Posted by Mark Carey
|
December 28, 2007 9:08 AM
Posted on December 28, 2007 09:08
After much hassle, I have the plugin sort of working - I at least get a real web page and an error message:
Can't connect to data source '' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at /home/public/mt/extlib/Data/ObjectDriver/Driver/DBI.pm line 54 at /home/public/mt/extlib/Data/ObjectDriver/Driver/BaseCache.pm line 153
The rest of the installation is working fine (as far as I can tell). Also, I easily got the default version of openid-server working with MT 4.12 when installed on my home machine (Mac 10.5), but it's been a nightmare at my nearlyfreespeech.net account.
Any tips?
Thanks!
Fletcher
Posted by fletcherp
|
August 13, 2008 9:04 PM
Posted on August 13, 2008 21:04
Oops - forgot the SUID bit on the server.cgi file.
All seems to be working now - sorry to bother.
Posted by fletcherp
|
August 13, 2008 10:23 PM
Posted on August 13, 2008 22:23
Remarkably, it works ifدردشة صوتية
الولة
شات صوتي
you only copy server.pm to the MTOS (4.1) extlib directory. One issue to explore, what if you have a multi-author blog and you're using this plug-in. Seems like it should work for all authors.
Posted by دردشة صوتية | April 8, 2009 1:20 PM
Posted on April 8, 2009 13:20
The rest of the installation is working fine (as far as I can tell). Also, I easily got the default version of openid-server working with MT 4.12 when installed on my home machine (Mac 10.5), but it's been a nightmare at my nearlyfreespeech.net account
شات صوتي
دردشة صوتيه
دردشة زين
Posted by شات صوتي | May 25, 2009 6:34 PM
Posted on May 25, 2009 18:34
Can't connect to data source '' because I can't work out what driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the DBI_DRIVER env var is not set) at /home/public/mt/extlib/Data/ObjectDriver/Driver/DBI.pm line 54 at /home/public/mt/extlib/Data/ObjectDriver/Driver/BaseCache.pm line 153
The rest of the installation is working fine (as far as I can tell). Also, I easily got the default version of openid-server working with MT 4.12 when installed on my home machine
شات زين
سعودي كول
Posted by سعودي كول | May 31, 2009 8:39 PM
Posted on May 31, 2009 20:39
Alden,
I looked into supporting this, but I gave up after a while, due to a lack of documentation on how to do this with Perl. If you know of any docs or perl libraries that might, let me know
http://www.chat.t7b.com/123.htm
Posted by دردشه | July 22, 2009 11:28 AM
Posted on July 22, 2009 11:28
I looked into supporting this, but I gave up after a while
Posted by شات صوتي | January 18, 2010 4:23 PM
Posted on January 18, 2010 16:23