首页 > 解决方案 > 身份验证服务在从 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
};

标签: ibm-mobilefirstmobilefirst-adaptersmobilefirst-server

解决方案


这是由于从一个节点到另一个节点的请求而发生的。在负载均衡器中处理它以根据 cookie 向特定节点发送请求并发布它工作正常。


推荐阅读