Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@jonz35
jonz35 / gist:5961842
Last active December 19, 2015 13:28
Idea on how to add a new openid discovery method to Drupal's core openid implementation to deal with google federated login url:s (https://www.google.com/accounts/o8/site-xrds?hd=example.com)
/**
* Implements hook_openid_discovery_method_info().
*
*/
function mymodule_openid_discovery_method_info() {
return array('my_discovery' => 'mymodule_google_discover');
}
function mymodule_google_discover($claimed_id) {
// $claimed_id will be something like http://example.com/openid?id=999999999