Yahoo! OpenID Plugin for Movable Type

This plugin utilizes Movable Type's extensible Open Id Login framework to give a preferential and customized login experience for Yahoo! users on Movable Type blogs.

Prerequisites

Yahoo! is one of the first OpenID providers to implement OpenID 2.0. Movable Type is the first to provide bundled support for consuming OpenID 2.0 identities. Therefore, you will need to the following installed to utilize this plugin:

  • Movable Type 4.2
  • Crypt::SSLeay Perl Module

Screenshot

Download

Installation

Unzip the file you download on the server you wish to install this plugin.

  • Copy the contents of the mt-static folder into Movable Type's mt-static folder. Be sure to preserve the directory structure.
  • Copy the contents of the plugins folder into Movable Type's plugins folder. Be sure to preserve the directory structure.

Documentation

Once the plugin has been installed you can enable Yahoo! authentication by navigating to the "Registration" section found under the Preferences > Blog Settings menu. Click the check box next to "Yahoo!" and click "Save Settings."

This plugin will work with dynamic and static publishing.

License

This plugin is licensed under the GPL.

23 Comments

Hi Byrne, The prereq's text is a bit ambiguous: If I have MT4.2, do I still need to jump through hoops to go find and install Crypt:SSLeay? Thnx! :)

It shouldn't be hard for your webhost to install that perl script. I logged into WHM for my server, then went to Main >> Software >> Install a Perl Module, then put Crypt::SSLeay into the search, installed it. Then I ftp'ed into the account where I wanted to install the plugin, and did so. Took less than 5 minutes, and it works. Plus the way I did it, means it'll be even easier to install of any other account on my server.

It's not a big deal at all to install.

This is a good, and useful plugin. Thank you!

I couldn't find anything in the MT4.2rc1-en core that needs or uses Crypt:SSLeay, so I'd say the answer to your question is 'possibly'.

When I click go to the Yahoo Sign In, I see this scary message on Yahoo's OpenID site: Warning: This website has not confirmed its identity with Yahoo! and might be fraudulent. Do not share any personal information with this website unless you are certain it is legitimate.

After I authenticate on my blog as a commenter, I get this error:

"You do not have permission to comment on this blog. (sign out)

RJ: The 'scary' message simply states that Yahoo! doesn't know, and can't verify, who runs the site you're authenticating to. Given that Yahoo! doesn't transfer any of your personal information in the authentication process, it's generally nothing to worry about.

The permission error on MT, however, sounds like a configuration issue. Are you sure comments are allowed on your installation/blog/post? If so, check the registration settings, as the problem might be there also.

Calrion.

Hy Byrne, the plugin works great, no problems installing it or anything.

However as you can see I logged in here to comment using your Yahoo! OpenID plugin, and it says comment by: https://me.yahoo.com/a/5RUO37F6mvblhV6MBUbSUiGyMR2eA2l0_hQ-#1630d.

That is a little ugly. Any chance to change that, make it all purdy like? Thanks.

That is changed at Yahoo. They have a FAQ about choosing your own unique Yahoo OpenID URL. Their concern being that if they chose it for you, it is quite possible someone could backwards engineer your Yahoo.com email address - which would be decidedly a bad thing.

very good plugin thank you

Such a great idea. I'm quite the noob when it comes to Movable Type, but I'm finding more and more awesome things about it.

Great plug-in Byrne, and the Yahoo approach with regard to allowing each user to choose their own Yahoo OpenID URL makes a great deal of sense. OpenID is a great idea, but if not handled properly it could be a privacy minefield.

Great plugin - anything to make MT better, I am all for.

MT is really catching up with other platform. Lots of cool features coming up.

Thanks Byrne. Worked like a charm first try. Good job!

I was having problems getting this plugin (v1.03) to work on my MT 4.23 blog, so I went in and hacked it up a bit. For example, see that I'm signed in here in with a nickname of https://me.yahoo.com/benalman#7e560, when it should probably be just benalman. It seems to work now. Here's a diff of my changes to YahooOpenId/lib/MT/Auth/Yahoo.pm

12c12,13
< sub _get_nickname {
---
> sub get_nickname {
>     my $class = shift;
15c16,17
<     if( $url =~ m(^https?://me.yahoo.com/(.*)/?$)
---
>     if( $url =~ m(^https?://me.yahoo.com/([\w.]+)([^/]*)$) ||
>         $url =~ m(^http://www.flickr.com/photos/(.*)$)
19c21,22
<     *MT::Auth::OpenID::_get_nickname->(@_);
---
>     return 'Yahoo user';
>     $class->SUPER::get_nickname(@_);

 

Note: I added the second-to-last line (return 'Yahoo user';) in order to provide a better looking default in case there's no match, as the default Yahoo OpenID URL is long enough to break my comments layout. And since Yahoo allows you to use your flickr URL as an OpenID, I added that in too. I'm not aware of other Yahoo OpenID formats.

  • Cowboy

I have incorporated much of these changes and released version 1.04. Thank you.

BTW, if Yahoo users want to customize the appearance of their Yahoo OpenID URL, they can do that from here:

Byrne, I see that you've made the change.. but while my OpenID.pm (2517) calls $class->get_nickname(), it never calls $class->_get_nickname(). If it's not looking at your plugin-defined _get_nickname sub, how can your code ever be called?

I'm so far from being a perl guru, but I'm trying to better understand this.. Thanks!

  • Cowboy

That might actually be a bug in MT now that you point it out. Are you observing that this new version of the plugin is not working? If so, then I might suggest you make this change in lib/MT/Auth/OpenID.pm, change:

sub get_nickname {
  my $class = shift;
  my ($vident) = @_;
  _get_nickname(@_);
}

To:

sub get_nickname {
  my $class = shift;
  my ($vident) = @_;
  $class->_get_nickname(@_);
}

And see if that does the trick.

Byrne, are you observing that this plugin is working? Because I'm getting the same nickname here. Of course, maybe that's because it's being cached, I don't know.

All I know is that after doing a bit of poking around OpenID.pm, it looks like any plugin-overridden _get_nickname sub will never get called, ever.

IMHO, it seems that a much simpler fix would be to override the get_nickname sub, instead of the _get_nickname sub.

Also, from looking through the MT source, it appears that the standard way to call a class super method would be to use $class->SUPER::method_name(args). Again, I'm not a perl guy, so I have very limited experience with this.

I'm just wondering if you tested this on 4.23, because I simply can't get your version to work. I haven't actually tested your latest fix, but I saw the svn commit and know that the specific issues I needed to address to get it to work with 4.23 aren't present there.

  • Cowboy

FYI, I've also noticed this issue in the built-in LiveJournal OpenID auth code, as well as the third-party AIM and WordPress OpenID plugins (all of which are clearly based on the same code).

Which leads me to believe that either these plugins all worked great until some recent MT change broke them, or that they actually do work and my 4.23 install is cursed.

Either way, I just figured I'd mention this since it's a rather subtle bug that seems to be affecting multiple plugins. Or that I'm totally insane.

  • Cowboy

Try the patch I provided in a previous comment and see if that works. I have not done any testing to be truthful and am operating somewhat on faith that your code would work. But now that you point some things out I can see where it wouldn't work as I have packaged it. So make that change to the core of MT and see if that fixes it. If so, then I can push Six Apart to make the change permanently.

Nice idea :)

I'll definitely be looking at putting this in place on a couple of my blogs e.g.

Latest technology news

Me and my friend were discussing this at lunch yesterday. It looks like you took the words right out of my mouth.

Leave a comment

what will you say?


Recent Comments

  • Me and my friend were discussing this at lunch yesterday. It looks like you took the words right out of my mouth. ...

  • really great plug-in ...

  • Nice idea :) I'll definitely be looking at putting this in place on a couple of my blogs e.g. Latest technology news ...

  • Try the patch I provided in a previous comment and see if that works. I have not done any testing to be truthful and am operating somewhat on faith that your code would work. But now that you point some things out I can ...

  • FYI, I've also noticed this issue in the built-in LiveJournal OpenID auth code, as well as the third-party AIM and WordPress OpenID plugins (all of which are clearly based on the same code). Which leads me to believe th...

    https://me.yahoo.com/benalman#7e560
    Yahoo! OpenID Plugin for Movable Type
Close