2011-05-08 156 views
1

我有一個網站,我想要用戶鏈接他們的GMail帳戶,我後來想通過OAuth訪問用戶GMail帳戶。我使用Google's OpenID+OAuth(混合協議)。Google OpenID&OAuth - 如何獲得令牌

當我按照上述文件,我得到以下 -

openid.assoc_handle AOQobUfg8E9PvTYX1huZPleVGoSvky57TxLHMzI-Lxd87cDNwLyrutSm 
openid.claimed_id https://www.google.com/accounts/o8/id?id=AItOawlus8fqLMQGgfCCM6pDZGpuNjwQqqYMs4o 
openid.ext1.mode fetch_response 
openid.ext1.type.email http://axschema.org/contact/email 
openid.ext1.value.email [email protected] 
**openid.ext2.request_token 4/C-VqYG9lRtJBKM9G15I-tFk58rOS** 
openid.ext2.scope https://mail.google.com/ 
openid.identity https://www.google.com/accounts/o8/id?id=AItOawlus8fqLMQGgfCCM6pDZGpuNjwQqqYMs4o 
openid.mode id_res 
openid.ns http://specs.openid.net/auth/2.0 
openid.ns.ext1 http://openid.net/srv/ax/1.0 
openid.ns.ext2 http://specs.openid.net/extensions/oauth/1.0 
openid.op_endpoint https://www.google.com/accounts/o8/ud 
openid.response_nonce 2011-05-07T18:38:37ZOEVDbKdW6d2g9A 
openid.return_to https://mysite.com/gmail_redir/ 
openid.sig niD5l9V7cG+LOE2zYjJ6rS0Cdwc= 
openid.signed op_endpoint,claimed_id,identity,return_to,response_nonce,assoc_handle,ns.ext1,ns.ext2,ext1.mode,ext1.type.email,ext1.value.email,ext2.scope,ext2.request_token 

我得到openid.ext2.request_token這是爲了讓我抓取用戶的Gmail累計。通過OAuth。這是如何運作的?我不需要訪問令牌(即oauth_access_secret和oauth_access_token)?

我是否需要提出更多要求?任何人都知道如何在此之後繼續?

回答