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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

edgauthier’s picture

Updated patch to fix up tabs/spaces

-Ed

sillygwailo’s picture

Status: Needs review » Reviewed & tested by the community

Before applying this patch, the Drupal site redirected to a page on myopenid.com with the following text:

\MyOpenID is not authorized to verifiy that [my URL] is your identifier. If it is your identifier, you can set up MyOpenID to verify it. See the help page for more information.

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.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

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?

edgauthier’s picture

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

edgauthier’s picture

Status: Needs work » Reviewed & tested by the community

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

moshe weitzman’s picture

FileSize
1.76 KB

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.

moshe weitzman’s picture

Version: 5.x-1.x-dev » master
Priority: Normal » Critical
walkah’s picture

Project: OpenID » Drupal core
Version: master » 6.x-dev
Component: OpenID Client » openid.module
Assigned: edgauthier » walkah

This has been committed to the 5.x version of OpenID - RTBC for HEAD as well (moshe's version should apply cleanly).

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)
eigentor’s picture

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/

thaiopenid.net’s picture

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?

etaroza’s picture

Priority: Critical » Normal
Status: Closed (fixed) » Active

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?

etaroza’s picture

Status: Active » Closed (fixed)

I created a bug report http://drupal.org/node/281785 with new findings.