使用 cfhttp 检索客户数据 - I/O 异常:对等端未经过身份验证

Retrieving customer data with cfhttp - I/O Exception: peer not authenticated

我已经设置了一个私人应用程序,可以读取客户详细信息和客户组。

我的 ColdFusion:

<cfhttp 
  url="https://[api-key]:[password]@rhein-essentials.myshopify.com/admin/customers.json"
  method="get" result="httpResp" timeout="120">
  <cfhttpparam type="header" name="Content-Type" value="application/json" />
</cfhttp>
<cfdump var="#httpResp#" />

其中 [api-key] 和 [password] 是从我创建私人应用程序时生成的数据中复制的。响应对象:

struct
Charset         [empty string]
ErrorDetail     I/O Exception: peer not authenticated
Filecontent     Connection Failure
Header          [empty string]
Mimetype        Unable to determine MIME type of file.
Responseheader  struct[empty]
Statuscode      Connection Failure. Status code unavailable.
Text            YES 

如您所见,返回时出现错误 "Connection Failure"。详细错误添加 "I/O Exception: peer not authenticated"。起初我倾向于认为这是我的 ColdFusion 代码的问题。但我随后尝试使用相同的 url 并将其直接插入我的浏览器。当我登录到 Shopify 网站时,url 重定向到 https://rhein-essentials.myshopify.com/admin/customers.json and displays the data properly. When I'm logged out, though, the url redirects to https://rhein-essentials.myshopify.com/admin/auth/login。使用 api 密钥和密码不是为了让我无需登录即可远程访问数据吗?

我做错了什么,如果不通过 ColdFusion,我如何才能在不登录的情况下从商店中检索数据?

正如@RRK 指出的那样,

Most likely this is a TLS1.2 issue which is a known issue with CF9. Can you try adding this -Dhttps.protocols=TLSv1.2 to the JVM setting in CF administrator?

看来确实是CF9的问题,因为升级到CF 2016 Patch 6后,连同Java 8 x64 V 172,数据恢复正常