Delegation doesn't work with myopenid.com
edgauthier - July 5, 2007 - 03:00
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | openid.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | walkah |
| Status: | closed |
Description
I noticed that delegation doesn't work with myopenid.com. It appears that the XRDS file returned from myopenid.com uses the element "LocalID" rather than "openid:delegate" for the 2.0 protocol.
The attached patch file updates the module to use LocalID for the identity if it's found. If LocalID isn't found, it falls back to delegate, and then back to claimed_id.
| Attachment | Size |
|---|---|
| openIDDelegationLocalID.patch | 1.66 KB |

#1
Updated patch to fix up tabs/spaces
-Ed
#2
Before applying this patch, the Drupal site redirected to a page on myopenid.com with the following text:
I've tested the patch, and this fixes the problem. That is, it correctly sees that I'm delegating from my OpenID URL to MyOpenID and logs me in (the first time asking me to 'allow').
Going out on a limb and suggesting this is RTBC.
#3
The code style quality in this patch has a lot to be desired. It uses tabs instead of spaces and there are no brackets in if/else/elseifs.
It would also be nice to point to references on why we need support for both localid and delegate? Are both in the standard for the same purpose?
#4
The second patch attached in #1 cleaned up the tab/spaces issue.
Attached is an updated version that includes the brackets in the if/else blocks.
I'll see if I can dig up some information on the difference between Localid/openid:delegate. I just noticed that when I tried to use delegation with myopenid.com, LocalID wasn't being sent back in the XRDS file, but openid:delegate was.
-Ed
#5
Alright - I spent a little time looking around and couldn't find a whole lot of information on this - just some information on Yadis vs OpenId. To be honest, I'm not exactly sure why this is needed (haven't really had the time to dig in to the spec in great detail). But, without this patch, delegation does not work with an OpenId from myopenid.com.
The same is true for OpenId that is in core for Drupal 6.0, so I would imagine a similar patch should be applied there as well (although I haven't looked at that code yet).
If you really want more information for this, it will have to wait until I get back from my honeymoon :)
-Ed
#6
this patch fixed my delegation issue. delegate www.tejasa.com to myopenid.net and it was busted before this patch.
i've rerolled for HEAD.
#7
#8
This has been committed to the 5.x version of OpenID - RTBC for HEAD as well (moshe's version should apply cleanly).
#9
Thanks, committed.
#10
#11
Sorry for reopening this thread: With a Drupal 6.1 Version it still does not seem to work. I'm redirected from myopenid.com to the login pane. But here, the openid is found in the box for creating a normal account which naturally does not work. Found the same behaviour on Boris Manns Blog http://bmannconsulting.com/
#12
I found a problem in using OpenID Delegation in Drupal 6.1. If I switch the order of href and rel attribute in link, say href before rel, i.e.,
<link href='http://www.myopenid.com/server' rel='openid.server'/><link href='http://user.myopenid.com/' rel='openid.delegate'/>
it does not work. Whereas the another form, say rel before href, i.e.,
<link rel='openid.server' href='http://www.myopenid.com/server' /><link rel='openid.delegate' href='http://user.myopenid.com/' />
works just well. Does anyone test this? And, what do you think?
#13
I am setting up Drupal 6.2 and trying to test the OpenID feature. I have set up the delegate for myopenid.com and myopenid complains with the following message:
The request was not a valid OpenID request. While processing the request, the following error occurred: return_to u'http://localhost/site-dev/?q=lt/openid/authenticate&destination=node' not under trust_root u'http://localhost/site-dev/?q=lt'
My delegation is set up under http://id.evaldas-taroza.lt in a standard way:
<head>
<link rel="openid.server" href="http://www.myopenid.com/server" />
<link rel="openid.delegate" href="http://evaldas.taroza.myopenid.com/" />
<link rel="openid2.provider" href="http://www.myopenid.com/server" />
<link rel="openid2.local_id" href="http://evaldas.taroza.myopenid.com/" />
<meta http-equiv="X-XRDS-Location" content="http://www.myopenid.com/xrds?username=evaldas.taroza.myopenid.com" />
</head>
I tried to use id.evaldas-taroza.lt with wikitravel.org and it works.
What could be the problem?
#14
I created a bug report http://drupal.org/node/281785 with new findings.