我們使用Apigee使用client_credentials
OAuth 2授權流程來請求持有人令牌。按照spec:Apigee似乎不支持OAuth 2規範,是否有原因?
4.4.2. Access Token Request
The client makes a request to the token endpoint by adding the
following parameters using the "application/x-www-form-urlencoded"
format per Appendix B with a character encoding of UTF-8 in the HTTP
request entity-body:
grant_type
REQUIRED. Value MUST be set to "client_credentials".
如果我們打個電話但我們得到了如下的錯誤:
{"ErrorCode" : "invalid_request", "Error" :"Required param : grant_type"}
看來,使用Apigee送我們到grant_type
作爲查詢參數。
這是爲什麼?由於Apigee處理OAuth 2的方式,我們有Apigee的客戶無法使用他們選擇的語言使用OAuth庫,並且很高興知道是否存在設計問題。
另外,它似乎不支持grant_type
在帖子正文中,並使用基本身份驗證發送ID和密鑰。
工程很好,非常感謝! – Michael 2014-09-01 07:14:55