首页 > 数据库技术 > 详细

使用Fiddler获取OAuth2认证的access token时候返回502

时间:2019-04-02 23:50:54      阅读:268      评论:0      收藏:0      [点我收藏+]

微软动态CRM专家罗勇 ,回复322或者20190402可方便获取本文,同时可以在第一间得到我发布的最新博文信息,follow me!

我这里Fiddler的Composer功能来获取OAuth2 认证的access token:

POST https://demo.luoyong.me/api/oauth2/token

Request Body:

grant_type=client_credentials&client_id=###################&client_secret=########

发现报错如下:

HTTP/1.1 502 Fiddler - Connection Failed
Date: Tue, 02 Apr 2019 02:08:43 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Cache-Control: no-cache, must-revalidate
Timestamp: 10:08:43.362

[Fiddler] The connection to ‘demo.luoyong.me‘ failed. <br />System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https&gt; HTTPS handshake to soa-demo.luoyong.me (for #2) failed. System.IO.IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. &lt; An existing connection was forcibly closed by the remote host

 这是咋回事呢?后来我找到一个 Some HTTPS sites are unaccessible when using Fiddler 

Fabio 提的方法如下,我验证了有效,

I was able to fix it by enabling the TLS1.2 protocol which is not enabled by default for outgoing connections (Tools / Fiddler Options.. / HTTPS / click on protocols list)

 我补充个截图如下,打开Fiddler的Options,设置HTTPS的协议Protocol支持 tls1.2:

技术分享图片

 

使用Fiddler获取OAuth2认证的access token时候返回502

原文:https://www.cnblogs.com/luoyong0201/p/Fiddler_OAuth2_HTTPS_TLS_1_2.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!