When the openid module comes back to authentication and it authenticates the user, would you be able to install a hook here hook_openid_response or something similar to that. Once the user is logged in then you can invoke the hook and pass the user account and the response.

This is so that we can have the standard openid.module and then we can also have contrib modules that will hook into that for simple registration and client attribute exchange.

I notice currently that sreg for email and nickname are already in the request, however this hook would be utilized so the contrib modules would be able too retrieve their data from the response and act upon it.

This would be called either right after each of the user_external_login function calls in that function.

Please advise if this would be something that can be considered for the openid module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

darren.ferguson’s picture

FileSize
1.31 KB

Sorry did not supply a patch, the attached patch is what i meant with regard to the hook required to get the response information for other modules such as Simple Registration and Attribute Exchange.

alex_b’s picture

Subscribe.

Aron Novak’s picture

Status: Active » Needs work
FileSize
1.46 KB
1.47 KB

Here are two patches, one for DRUPAL-6, one for HEAD.This is basically the same as #1, but the hook_response() is called from one code place.

Aron Novak’s picture

It does not apply anymore to the HEAD. Needs to be rerolled.

Aron Novak’s picture

Version: 6.5 » 7.x-dev
Status: Needs work » Needs review
FileSize
1.08 KB

This patch is basically the same as #1, but rerolled to HEAD.
You can check out the concept behind this patch in the initial post of this thread, that's a nice summary!

Aron Novak’s picture

Of course openid.api.php should be updated as well.

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review
moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. There is no way that this patch breaks anything. Just adds a hook.

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

Aron Novak’s picture

Status: Needs work » Needs review

I'm in doubt that this is really broken or it was a glitch w/ testing infrastructure.

Aron Novak’s picture

Status: Needs review » Reviewed & tested by the community

moshe: thanks for the RTBC! I just restore the status of the ticket prior the crazy bot.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.