John
John

Reputation: 4944

Does Zend Gdata Support OAuth?

I installed Zend Gdata 1.11.2 but I don't see anything in it labeled OAuth... does it support OAuth?

Upvotes: 2

Views: 3592

Answers (4)

devon girard
devon girard

Reputation: 21

I do it like this, for Docs, Calendar, and Picasa:

$oauthOptions = array( 
'requestScheme' => Zend_Oauth::REQUEST_SCHEME_HEADER, 
'version' => '1.0', 
'signatureMethod' => 'HMAC-SHA1', 
'consumerKey' => $CONSUMER_KEY, 
'consumerSecret' => $CONSUMER_SECRET 
); 

$consumer = new Zend_Oauth_Consumer($oauthOptions); 
$token = new Zend_Oauth_Token_Access(); 
$httpClient = $token->getHttpClient($oauthOptions,null);
$service = new Zend_Gdata_Photos($httpClient); //OR WHATEVER CLASS U WANT

...and then run your GData calls as normal through $service.

Upvotes: 2

Till
Till

Reputation: 22408

No, it currently doesn't.

We integrate with a Google Documents for example, and all we can use currently is AuthSub. I haven't checked every line of code in there, but I think it's outdated in this respect. Of course we could create our own wrapper using OAuth, but this defeats the purpose of the framework for me.

Also, when you check out Google's examples, they tell you to use Zend_Oauth as well:

http://code.google.com/apis/gdata/docs/auth/oauth.html#Examples (click on "PHP")

Upvotes: 1

solefald
solefald

Reputation: 1799

Oauth library is a part of the full ZF package.

Upvotes: 0

user594791
user594791

Reputation: 617

For OAuth there is seprate ZF component: Zend_OAuth.

Upvotes: 1

Related Questions