From #217912: Document undocumented hooks (currently 1 remaining on list) and #131026: OpenID Consumer/Relying Party support in core for 6.x, we have one undocumented hook left in core, hook_openid(). The hook is called from openid_authentication_request. I'd like to help document this, but for the life of me I have no idea what it does since the documentation in openid.module is so sparse.

Note: This documentation needs to go in a new file called 'openid.api.php' in modules/openid for D7, and when backported to 6.x I can easily commit it to the contrib/docs/developer/hooks/core.php file.

CommentFileSizeAuthor
#5 345376-hook_openid.diff1.03 KBjeffschuler
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Title: Document hook_openid() » Document missing hook_openid()
Component: openid.module » documentation
matason’s picture

I've had a look at this, the hook enables modules to modify the request parameters before they get sent over to the OpenID provider. A module wanting to implement this hook would need a function like this:-

function my_module_openid($op, $request) { ... }

and would need to return an a keyed array like this:-

return array('openid.identity' => 'http://matason.myopenid.com/');

Hope this is helpful?

jeffschuler’s picture

Assigned: Unassigned » jeffschuler
jeffschuler’s picture

Assigned: jeffschuler » Unassigned
Status: Active » Needs review
FileSize
1.03 KB

Created file openid.api.php with hook_openid() briefly described, including an example.

My best guess, as openid_authentication_request is undocumented as well.

Thanks to jhodgdon and kscheirer for help with this (at the DrupalCon DC documentation sprint.)

webchick’s picture

Status: Needs review » Fixed

Awesome!! Thanks!! :D

webchick’s picture

Aw, shoot. :( I read over this too quickly and didn't mention all the people in the commit message. :( I'm really sorry. :(

I'll type your names twice in the next one. ;)

Status: Fixed » Closed (fixed)

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