This needs to be ported to Drupal 5. Any takers?

CommentFileSizeAuthor
#4 drupal5.patch15.85 KBjirwin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jirwin’s picture

I have a port of the 4.6 version to 5 finished. It seems to be working great. I started working on the 4.7 version, but got confused on a few things. If the latter would be more preferred, I will continue on this one. You can find it at http://jirwin.net/openid-5.tar.gz. I just figured out that there is a CVS repo, so I will work on making a patch to that, and post that up in a bit as well.

whitehat101’s picture

Version: 4.7.x-2.x-dev » master

Thank you for working on the OpenID module.

I downloaded tarbar, uncompressed, read the README, issued the pear command to download the auth_openid
php module, installed the openid module for drupal, enabled the module, added the block, the block appeared on the login page, type my myopenid.com id into the openid login box, i was taken to myopenid.com where I was prompted for the appropriate information and then redirected back to my site where I received:

" OpenID authentication failed (failure, No session state found)."

Thank you
Regards,
Lou

jirwin’s picture

As it isn't too easy to troubleshoot your problem with the info you gave me, I think you should check your drupal database for 3 tables that have the openid_ prefix. It seems like it may be possible that these didn't get created, so the module isn't storing the session properly. Beyond that, I would have to take a closer look. I have tested my site(http://jirwin.net) with three different logins from three different providers, and they have all worked. Let me know.

jirwin’s picture

Version: master » 4.6.x-1.x-dev
Component: Code » OpenID Client
Status: Active » Needs review
FileSize
15.85 KB

So, after getting a few emails for some more features, I made the Drupal 5 version much more complete. It now pulls a username and email address from the persona of the OpenID, using those to create a new drupal account. Instead of using auth_maps, I decided that it would be a lot nicer if any user can set an OpenID in their profile thus allowing them to use their OpenID to login as well. So now all users have a field in their profile for an OpenID, allowing any user to easily enable OpenID authentication for themselves.

I went ahead and tried my best to make a good patch. I couldn't quite figure out how to pull down the CVS to made a diff based on that. If anything, you can go ahead and download a tarball of the module at http://jirwin.net/openid-5-2.tar.gz.

Please try this out, try and break it, whatever you like. Feel free to get in contact with me if you have any questions or find any problems.

Thanks!

jvandervort’s picture

This is great. Please try to get this officially commited to CVS.

Boris Mann’s picture

Version: 4.6.x-1.x-dev » master

This is the OpenID 1.1.x version. A new branch is being developed that supports 2.x natively and backwards support for the 1.1.x version.

So...we have to figure out how to make different versions available.

Tobias Maier’s picture

I like Justins' port.

What speaks agains creating a 5.x-1.0-branch with Justins version

and as soon as you finished developing 2.x support and ready to port your module to 5 then you could start a 5.x-2.0-dev branch where you start merging this to versions.

edrex’s picture

I'm running Justin's patched 5.x version on several sites.

let's commit this as 5.x-1.x. It will be easy enough to migrate to 2.x later.

bdmp’s picture

I installed the openid library and this module but when I go to the module page it is not listed there. what am I missing?

bdmp’s picture

Nevermind the last post. I figured it out.

I do have another question though. When I imagined what openid is, I thought that when you sign up at a site you just add your openid url and everything else happens automatically. Is that not the case?

After enabling the module, when signing up the site still asks for all the information it did before and the openid url.

So what is the point of openid? What does it do for us? Or is there something I am missing?

bdmp’s picture

Ok, so I figured out that you have to enable the openid block, but here is what is confusing about that.

The module doesn't disable the non-openid log in and it doesn't automatically add the block to the log in page.

The way around this is to make a new page, make the openid login block appear only on that page then edit the menu to say "log in" and point the the new page. I guess that could work but it doesn't disable the normal log in so if you knew the url you could just go there. Wouldn't it be easier to make the module, by default, show the block on the log in page and disable the normal log in?

I think you all know a lot more about this stuff than me so if I am missing something let me know.