GData API with secure AuthSub

Authsub を secure=1 で
We have a certificate for your domain.
Upload new X.509 cert:
(Optional)

# Generate the RSA keys and certificate
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -sha1 -subj \
‘/C=US/ST=CA/L=Mountain View/CN=www.example.com’ -keyout \
myrsakey.pem -out /tmp/myrsacert.pem
で生成した myrsacert.pem を登録して
zendのclient作成時に myrsakey.pem を設定してあげると警告が消えます!

$client = new Zend_Gdata_HttpClient();  
// This sets your private key to be used to sign subsequent requests  
$client->setAuthSubPrivateKeyFile('/path/to/myrsakey.pem', null, true);  

$sessionToken = Zend_Gdata_AuthSub::getAuthSubSessionToken(trim($singleUseToken), $client);  
// Set the long-lived session token for subsequent requests  
$client->setAuthSubToken($sessionToken);

http://code.google.com/intl/ja/apis/gdata/docs/auth/authsub.html#Registered

http://gdatatips.blogspot.com/2008/09/secure-authsub-using-zend-php-library.html

http://www.ibm.com/developerworks/jp/xml/library/x-phpgooglecontact/

無事消えました。

This entry was posted on 日曜日, 8月 1st, 2010 at 5:32 AM and is filed under api, Google, php. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。