My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 35: Support for Google Hybrid Protocol (OpenID+OAuth)
8 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by remi.lan...@gmail.com, Apr 12, 2011
Hello,

It seems that this class doesn't support Google Hybrid Protocol with is basically an OAuth extension to the OpenID protocol: https://code.google.com/apis/accounts/docs/OpenID.html#oauth

Here is what I did to support it

* I added a public $oauth variable (false)
* Added this code to authUrl_v2:

if ( $this->oauth ) {
	$params['openid.ns.oauth'] = 'http://specs.openid.net/extensions/oauth/1.0';
	$params['openid.oauth.consumer'] = str_replace(array('http://','https://'),'',$this->trustRoot);
	$params['openid.oauth.scope'] = implode(' ',$this->oauth);
}

It's a bit hackish, but it's working for my needs. Usage example (to get the OAuth working you have to register your domain in Google first):

$openid->identity = "https://www.google.com/accounts/o8/id";
// request access to Google Analytics
$openid->oauth = array(
	'https://www.google.com/analytics/feeds/'
);

Hope this help!

Regards
Jul 31, 2011
#1 marc...@santiago.cl
Hi, thanks for this code, I have been looking for a way to do just this with this library.

Just one question, what is the code to get Oauth Request Token and then trade it for the Access token?
Does it come in the $openid->getAttributes() variable?

Thanks
Dec 1, 2012
#2 ignat.ig...@gmail.com
Support for Google hybrid protocol has been added in the Github clone of LightOpenID at: https://github.com/iignatov/LightOpenID.

A new method was added for getting the OAuth request token - getOAuthRequestToken().

Hope this helps.
Dec 3, 2013
#3 jeff.kis...@gmail.com
Is there an example anywhere of using LightOpenID with the hybrid OpenID and OAuth?  It doesn't look like the iignatov code actual supports the hybrid functionality.

Powered by Google Project Hosting