« Add Comment Titles to MT4 Blogs | Main | MT4 Podcasting Templates »

Use Your Own MT Login on Other MT Blogs

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

  1. Extact the files from the zip file and upload the contents of the 'plugins' folder to the 'plugins' directory of your MT installation
  2. Upload the contents of the 'extlib' directory to the 'extlib' directory.
  3. Change the permissions on the /plugins/openid-server/server.cgi file to 755 (CHMOD 755)
  4. In your author profile, set your Website URL to the URL you wish to use as your OpenID profile URL.
  5. In the <head> section of that page, add the HTML tag:
  6. <link rel="openid.server" href="<MTCGIPath>plugins/openid-server/server.cgi" />

    OR (easier)

    <$MTOpenIDHeader$>

  7. 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.

  8. To sign in with OpenID, when presented with an OpenID signon form, enter the URL to your

  9. profile URL. If you are not logged in to Movable Type, you will be prompted to log in.

Download Now

The OpenID Server plugin is free software.

Download Now
Downloads: 297

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...

Rate this entry:

  • Currently 4.6/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 4.6/5 (24 votes cast). Powered by the Ajax Rating plugin.

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!

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!

wilpig Author Profile Page:

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?

Hi wilpig, that's the correct behaviour, I believe.

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.

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 :)

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...

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.

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.

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.

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

Oops - forgot the SUID bit on the server.cgi file.

All seems to be working now - sorry to bother.

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.


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



شات صوتي


دردشة صوتيه



دردشة زين


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



شات زين


سعودي كول

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

I looked into supporting this, but I gave up after a while

Post a comment