身份验证适配器有时会抛出“过程调用错误”。尝试清除缓存和cookie,但仍然相同。因此,我们尝试从同一用户的不同系统登录,并且可以正常工作。一旦我们在发生问题的浏览器中尝试使用不同的ID,它就会起作用,然后再与有问题的Member ID一起起作用,这非常令人困惑。发生问题时,所需的身份验证未得到响应。
我们尝试了检查日志并在尝试安全性测试过程时从身份验证适配器找到了WorklightAuthenticationException。
身份验证适配器代码:
var result = WL.Server.invokeHttp(input);
WL.Logger.info(“身份验证服务:” + JSON.stringify(结果));
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
};
答案 0 :(得分:0)
由于请求从一个节点发送到另一节点而发生。在负载均衡器中进行了处理,以基于cookie将请求发送到特定节点,并发布其正常工作。
答案 1 :(得分:0)
描述中提到了有关清除缓存和cookie以及使用浏览器的信息。
与会话无关的模式不支持基于浏览器的环境。这些仅在会话相关模式下工作。因此,必须启用基于会话的相似性,以确保请求落在同一JVM中以保留身份验证状态。
更多详细信息可以在这里找到:Session-independent mode