Java 在mfp WL.Client.createSecurityCheckChallengeHandler()或WLAuthorizationManager.Login()中登录失败

Java 在mfp WL.Client.createSecurityCheckChallengeHandler()或WLAuthorizationManager.Login()中登录失败,java,android,typescript,authentication,mfp,Java,Android,Typescript,Authentication,Mfp,以下是mfp.auth.service.ts文件中的代码: performLogin(username: string, loginRequest: RequestModel<LoginRequestModel>): Observable<any> { let mfpAuthResponse: any; let userLoginChallengeHandler = WL.Client.createSecurityCheckChalleng

以下是
mfp.auth.service.ts
文件中的代码:

performLogin(username: string, loginRequest: RequestModel<LoginRequestModel>): Observable<any> {
        let mfpAuthResponse: any;
        let userLoginChallengeHandler = WL.Client.createSecurityCheckChallengeHandler(this.securityCheckName);
        (userLoginChallengeHandler as any).securityCheckName = this.securityCheckName;
        console.log("this.securityCheckName is " + this.securityCheckName);
        userLoginChallengeHandler.handleSuccess = (loginSuccess) => {
            console.log("handleSuccess mfpAuthResponse is " + mfpAuthResponse);
            if (!mfpAuthResponse) {
                console.log("handle here");
                mfpAuthResponse = {
                    id: loginSuccess.id,
                    accessToken: loginSuccess.user.attributes.access_token,
                    tokenType: loginSuccess.user.attributes.token_type,
                    expiresIn: loginSuccess.user.attributes.expires_in,
                    scope: loginSuccess.user.attributes.scope,
                    clientId: loginSuccess.user.attributes.client_id
                };
            }
        };
        console.log("line 41");
        userLoginChallengeHandler.handleFailure = (loginError) => {
            console.log("handleFailure " + loginError);
            if (!mfpAuthResponse) {
                mfpAuthResponse = loginError;
            }
        };

        let authRequest = {
            requestHeader: {
                deviceId: this.sessionService.getDeviceId(),
                channelTime: new Date().toISOString()
            },
            requestBody: loginRequest.requestBody
        }
        this.currentLoginGrantType = loginRequest.requestBody.grant_type;
        console.log("ready to return ");
        return from(new Promise(
            (resolve, reject) => {
                console.log("line 60");
                WLAuthorizationManager.login(this.securityCheckName,
                    {
                        'authorization': environment.authorization,
                        'authRequest': JSON.stringify(authRequest),
                        'authCode': this.service.getHashMAC(authRequest, this.sessionService.getHashKey()),
                        'authUser': username
                    }
                ).then(
                    (res) => resolve(mfpAuthResponse),
                    (err) => reject(mfpAuthResponse)
                );
            }
        ));
        console.log("line 79 end");
    }
performLogin(用户名:string,登录请求:RequestModel):可观察

我发现当我使用正确的MFP服务器时,我无法登录到我的应用程序。根据控制台日志,我可以看到它进入
console.log(“第60行”+this.securityCheckName),然后不再转到
handleSuccess
。另外,它没有涉及后端代码,也就是我刚才提到的
validateCredentials
。mfp服务器日志中没有错误,后端服务api日志中也没有错误。在我用来检查android手机的chrome浏览器中,也并没有错误。我怀疑
WLAuthorizationManager.login()中有错误,但是没有错误日志,我不知道如何跟踪和修复它

我怀疑我需要在适当的mfp服务器中配置一些东西?因为如果我使用mfp开发者工具包服务器,代码运行良好。(mfp开发者工具包服务器只是需要安装的一个命令,我认为它已经帮助我正确配置了。)


我是mfp和typescript的新手,在谷歌搜索了几天后仍然不知道如何解决这个问题。请对此提出建议。

对于像我这样有问题的人,我终于找到了问题所在。Mfp 8.0的基础是从2016年开始的,在我于2020年1月安装IBM提供的补丁包之后,问题就解决了。我只是怀疑2016年之后,android和IOS代码已经更新,因此如果不安装fixpack,它将有这个bug