ibm-mobilefirst - 身份验证服务在从 MFP 6.3 升级到 MFP 7.1 后引发过程调用错误
问题描述
身份验证适配器有时会抛出“过程调用错误”。尝试清除缓存和cookie,但仍然相同。所以我们尝试从不同的系统为同一个用户登录并且它有效。这很令人困惑,因为一旦我们在出现问题的浏览器中尝试使用不同的 ID,它就可以工作,然后它也可以与有问题的会员 ID 一起工作。发生问题时,所需的身份验证没有响应。
我们尝试查看日志并在尝试安全测试过程时发现来自身份验证适配器的 WorklightAuthenticationException。
身份验证适配器代码:var result = WL.Server.invokeHttp(input);
WL.Logger.info("认证服务:" + JSON.stringify(result));
authResponse = prepareJSONResponse(result,channelId);
WL.Logger.info('Formatted response -> ' + JSON.stringify(authResponse));
if(result.isSuccessful == false){
WL.Logger.info("Error: " + result.errorMessage);
return onAuthRequired(null, "Error in connecting to server. Please try again later.");
}
if(typeof authResponse.errorMessage != 'undefined'){
WL.Logger.info("Error is defined" +authResponse.errorMessage);
return onAuthRequired(null, authResponse);
}
WL.Logger.info("Authentication service success: " + JSON.stringify(result));
WL.Logger.info("userIdentity Parameters: " + inputParams.CorpId);
var userIdentity = {
userId: inputParams.CorpId,
displayName: inputParams.CorpId,
attributes: {
foo: "bar"
}
};
WL.Logger.info("userIdentity::"+JSON.stringify(userIdentity));
WL.Server.setActiveUser("SingleStepAuthRealm", userIdentity);
return {
authRequired: false
};
解决方案
这是由于从一个节点到另一个节点的请求而发生的。在负载均衡器中处理它以根据 cookie 向特定节点发送请求并发布它工作正常。
推荐阅读
- r - 如何查看用于训练模型的观察次数?
- sql-server-2008-r2 - 无法在 CSV 文件中应用 SQL Server 2008 R2 中的任何查询?
- javascript - 制作 DOM 的副本
- python - django 模板不存在 execpt home url
- r - r 根据条件生成具有值的列
- r - 使用 plot.matrix 更改轴标记
- discord.py-rewrite - Discord.py bot 禁用在所有频道中发送消息
- reactjs - React/Security - 可以检查 React 路由吗?
- optimization - 如何计算前一周市场开盘的时段数
- python - 如果我删除我的 css,在我的关于 django 模板的页面中面对这个问题,那么它工作得很好,否则每当我用来显示图像时它都会给我一个错误