1
我正在嘗試使用oath2規範爲Google的「服務帳戶」身份驗證形成一個json請求進行身份驗證。我正在使用谷歌的文檔here。它使用JWT。似乎沒有太多有關如何使用C#執行此操作的信息。這是我正在使用的RAW json請求,但我可以從google獲得的唯一回復是「invalid_request」。OAuth2「Google服務」身份驗證返回「invalid_request」
POST https://accounts.google.com/o/oauth2/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: accounts.google.com
Content-Length: 457
Expect: 100-continue
Connection: Keep-Alive
{
"grant_type": "assertion",
"assertion_type": "http://oauth.net/grant_type/jwt/1.0/bearer",
"assertion": "JWT (including signature)"
}
關於可能發生什麼的任何想法?我試圖創建一個Windows服務,以設定的時間間隔ping谷歌緯度位置?是否有另一種方式可以在不跳過這個圈的情況下訪問該API?謝謝!
,顯然我更換「智威湯遜(包括簽名)」我自己的計算令牌 – aceinthehole 2012-04-12 23:42:47
看起來不喜歡符合「application/x-www-form-urlencoded」的內容。這是json。 – spender 2012-04-13 00:37:01