【问题标题】:Facing issues while integrating Mobilefirst CLI 7.1 with ldap将 Mobilefirst CLI 7.1 与 ldap 集成时面临的问题
【发布时间】:2015-12-23 13:13:27
【问题描述】:

我正在使用移动优先 CLI 7.1 并尝试与 LDAP 集成。

我正在关注this 文件来实施。第一次在浏览器中加载应用程序时出现 401 错误 (Failed to load resource: the server responded with a status of 401 (Unauthorized))。我在尝试登录时收到 500 错误(POST http://localhost:10080/Project/apps/services/j_security_check 500 (Internal Server Error))。我取消了 wl.client.connect 的注释,并在 stackoverflow 上进行了以下对话。 Link1link2link3

服务器日志

 [ERROR   ] SESN0008E: A user authenticated as anonymous has attempted to access a session owned by user:BasicRegistry/admin.
 [ERROR   ] SESN0008E: A user authenticated as anonymous has attempted to access a session owned by user:BasicRegistry/admin.
 [ERROR   ] SESN0008E: A user authenticated as anonymous has attempted to access a session owned by user:BasicRegistry/admin.
 [ERROR   ] SESN0008E: A user authenticated as anonymous has attempted to access a session owned by user:BasicRegistry/admin.

我的方案是什么?

用户最初被带到登录页面,稍后当他单击登录时,我将收集详细信息并在引发挑战和提交时自动设置为 j_secutity_form。当我打开应用程序时得到 401,当我点击登录时得到 500。哪个调用

var reqURL = '/j_security_check';
        var options = {};
        options.parameters = {
            j_username : loginData.email,
            j_password : loginData.password
        };
        options.headers = {};
        ldapRealmChallengeHandler.submitLoginForm(reqURL, options,ldapRealmChallengeHandler.submitLoginFormCallback);   

我有以下问题:

1) 我所关注的文档是完整的还是需要做一些补充的事情?

2) 出现上述错误的原因是什么

这是我的代码:

var ldapRealmChallengeHandler = WL.Client.createChallengeHandler("LDAPRealm");

ldapRealmChallengeHandler.isCustomResponse = function(response) {
    if (!response || response.responseText === null) {
        return false;
    }
    var indicatorIdx = response.responseText.search('j_security_check');

    if (indicatorIdx >= 0){
        return true;
    }  
    return false;
};


ldapRealmChallengeHandler.handleChallenge = function(response){
};

ldapRealmChallengeHandler.submitLoginFormCallback = function(response) {
    var isLoginFormResponse = ldapRealmChallengeHandler.isCustomResponse(response);
    if (isLoginFormResponse){
        ldapRealmChallengeHandler.handleChallenge(response);
    } 
    else {
        ldapRealmChallengeHandler.submitSuccess();
    }
};  

logout = function(){
    WL.Client.logout('LDAPRealm',{});
}

【问题讨论】:

    标签: authentication ldap ibm-mobilefirst mobilefirst-server mobilefirst-cli


    【解决方案1】:

    我认为这可能与从 MFP 7.1 开始默认打开的会话独立模式有关。我认为这可以解释为什么您会收到 SESN0008E 错误。 Here 是一篇文章的链接,该文章解释了如何禁用会话独立性。

    关于 SESN0008E 错误here 的更多信息。

    请告诉我你的进展情况。

    【讨论】:

      猜你喜欢
      • 2018-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-23
      • 2016-03-05
      • 2021-02-27
      相关资源
      最近更新 更多