【发布时间】:2026-02-14 19:15:02
【问题描述】:
我目前使用的是 IBM MobileFirst Platform 8.0。和 Datapower 作为反向代理服务器。
我已经实现了挑战处理程序,如 https://mobilefirstplatform.ibmcloud.com/blog/2016/06/17/datapower-integration/
iPhone 7 Plus 和 iPhone 6 plus 一切正常,但每当我在其他 iPhone(iPhone 6 或 iPhone 6s)上运行应用程序时,以下方法永远不会被调用 -
dataPowerChallengeHandler.canHandleResponse = function(response) {
if (!response || response.responseText === null) {
return false;
}
var indicatorIdx = response.responseText.search('j_security_check');
if (indicatorIdx >= 0) {
return true;
}
return false;
};
Plus 和其他 iPhone 有什么不同吗?
我使用的是 MFP 平台版本 - 8.0.0.00-20170131-101344
XCode 8.0 版
ios 版本 10.0
【问题讨论】:
-
您发现问题所在的设备是否运行不同版本的操作系统?网络捕获显示什么 - 在服务器端显示请求和响应的那个。线索就在那里
-
观察了 Datapower 日志。 iPhone 7 Plus 设备的请求转到 api/preauth/v1/preauthorize,但 iPhone 6 的请求转到 api/registration/v1/self。为什么会有这种差异?
-
最初我在下面调用函数- WLAuthorizationManager.obtainAccessToken(userLoginChallengeHandler.securityCheckName).then( function (accessToken) { WL.Logger.debug("obtainAccessToken onSuccess"); }, function (response) { WL.Logger.debug("obtainAccessToken onFailure:" + JSON.stringify(response)); });
-
您是第一次在两台设备上运行应用程序吗?还是一台设备已经安装,而另一台设备是最近安装的
标签: ibm-mobilefirst