Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | 345376-hook_openid.diff | 1.03 KB | jeffschuler |
Comments
Comment #1
Dave ReidComment #2
matason CreditAttribution: matason commentedI'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?
Comment #4
jeffschulerComment #5
jeffschulerCreated file
openid.api.php
withhook_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.)
Comment #6
webchickAwesome!! Thanks!! :D
Comment #7
webchickAw, 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. ;)