将 OAuth 请求代理到 Twitter API

标签 proxy oauth twitter twitter-oauth

我一直在为 iPhone 测试应用程序使用 twitter API,但我错过了使用 Charles (http://www.charlesproxy.com) 等软件代理我对 twitter API 所做的请求的能力/)。尽管 Twitter 具有 SSL 代理功能,但它似乎不喜欢中间有不同的证书对请求进行签名这一事实。 有什么办法可以做到这一点吗?如果能够查看请求以及 Charles 格式化 JSON 响应的方式等,我会非常有用...

最佳答案

Twitter 无法知道中间有一个人。我没用过Charles,但我用过Fiddler2。试试那个。

http://www.charlesproxy.com/documentation/proxying/ssl-proxying/

http://www.fiddler2.com/fiddler/help/httpsdecryption.asp

解密 HTTPS 的原理是代理制作自己的证书并将其提供给浏览器。浏览器会注意到它连接了一个错误的证书并发出警告,但服务器(Twitter)只会将代理视为另一个浏览器。代理服务器连接使用 Twitter 的证书,因此仍然安全。

也许这是你的问题:

Q: Can Fiddler intercept traffic from Apple iOS devices like iPad/iPhone/iPod Touch and Android devices? A: Yes, but these devices may not be compatible with the default certificates Fiddler generates.

To resolve the incompatibility, you may replace Fiddler's default certificate generator with one that generates certificates containing flags (e.g. AKID, SKID) that are compatible with these platforms. Simply download and install the new Certificate Maker and restart Fiddler.

关于将 OAuth 请求代理到 Twitter API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7467612/

相关文章:

ios - Twitter profileImageURL 间歇性不加载(iOS Swift)

apache - Apache 上的反向代理(适用于 QNAP)

networking - kubernetes pod内的代理不会拦截任何HTTP流量

android - 在 Android 客户端/服务器应用程序中实现 Google 登录

oauth - WebSphere Docker OAuth

php - 如何缓存 twitter api 结果?

java - 在负载均衡器代理服务器的情况下如何获取实际 URL

http - 如何将 docker 容器端口 + http 代理到子 URL?

php - 如何处理 ROLES 和 FOSOAuthServerBundle 范围

ruby-on-rails - 从 Rails 3 应用程序发布到 Twitter 帐户