submitLoginForm()不会将数据发送到身份验证服务器 - MobileFirst Cordova客户端 [英] submitLoginForm() does not send the data to the authentication server - MobileFirst Cordova client

查看:197
本文介绍了submitLoginForm()不会将数据发送到身份验证服务器 - MobileFirst Cordova客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在MobileFirst平台上编写一个cordova混合应用程序测试应用程序。在我的挑战处理程序,我包括一个代码使用submitLoginForm()java脚本API发送登录信息到我的身份验证服务器。

I am trying to write a cordova hybrid application test application on MobileFirst platform. In my challenge handler, I have included a code to send a login information to my authentication server using submitLoginForm() java script API.

我使用wireshark检查任何授权请求

I check using wireshark if any auth request to my authentication server is getting generated, but it does not.

您能帮我确定我的代码的问题吗?

Can you please help me identify the issue with my code?

我可以看到警报,直到 Inside handleChallenge3 ,但没有看到关闭挑战处理程序的警报。

I can see the alert until Inside handleChallenge3, but does not see the alert for Closing Challenge Handler.

还有一件事,我试图使用isCustomResponse()API只是为了看到什么样的挑战/响应来到我的挑战处理程序,但似乎没有被触发。是否已在MobileFirst Platform 8中弃用?

One more thing, I am trying to use isCustomResponse() API just to see what kind of challenge/response is coming to my challenge handler, but it seems not to be getting triggered. Has this been deprecated in MobileFirst Platform 8?

感谢

var LtpaAuthChallengeHandler = function(){
      LtpaAuthChallengeHandler = WL.Client.createWLChallengeHandler("LtpaBasedSSO");

      LtpaAuthChallengeHandler.isCustomResponse = function(transport) {
        alert ("Inside isCustomResponse");
        return true;
      };

      LtpaAuthChallengeHandler.loginResponse = function(response) {
        alert ("Inside loginResponse");
        LtpaAuthChallengeHandler.submitSuccess();
        alert ("After loginResponse");
      };
      // handleFailure
      LtpaAuthChallengeHandler.handleFailure = function(error) {
         // WL.Logger.debug("Challenge Handler Failure!");
          if(error.failure !== null && error.failure !== undefined){
             alert(error.failure);
          }
          else {
             alert("Unknown error");
          }
      };

      LtpaAuthChallengeHandler.handleChallenge = function(challenge) {
        alert ("Inside handleChallenge");
        var msg = "";
    alert ("Inside handleChallenge1");
        var options = {
          "headers"     : {},
          "parameters"  : {
            "username" : "admin",
            "password" : "admin",
            'login-form-type' : 'pwd'
          }
        };
    alert ("Inside handleChallenge2");
        var loginUrl = "<URI for forms based auth of auth server>";
    alert ("Inside handleChallenge3");
        LtpaAuthChallengeHandler.submitLoginForm (loginUrl, options, LtpaAuthChallengeHandler.loginResponse);

        alert ("Closing Challenge Handler");
      };
    };


推荐答案

WLChallengeHandler的 submitChallengeAnswer()将回答传回安全检查。

Once the credentials have been collected from the UI, use WLChallengeHandler's submitChallengeAnswer() to send an answer back to the security check.

isCustomResponse )不适用于MFP 8.0。

isCustomResponse() is not applicable from MFP 8.0.

请参阅认证和安全主题此处

Refer to the Authentication and Security topic here.

这篇关于submitLoginForm()不会将数据发送到身份验证服务器 - MobileFirst Cordova客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆