-1

我正在使用基于Worklight适配器的身份验证方法来验证应用程序。在服务器通过身份验证测试成功响应之后,应用程序开始一直向服务器发送请求。Worklight应用程序:身份验证后对服务器的大量请求

来自服务器的日志表示,该用户在循环中登录并注销。

{ 
    "message": "invoke logout request [project ProjectName]", 
    "sourceClass": "com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation", 
    "sourceMethodName": "info", 
    "level": "INFO", 
    "source": "server", 
    "threadId": 19, 
    "loggerName": "com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation", 
    "server": { 
     "ip": "--" 
    }, 
    "timestamp": "---" 
    } 
    { 
    "message": "Setting active user [project ProjectName]", 
    "sourceClass": "com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation", 
    "sourceMethodName": "info", 
    "level": "INFO", 
    "source": "server", 
    "threadId": 19, 
    "loggerName": "com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation", 
    "server": { 
     "ip": "--" 
    }, 
    "timestamp": "---" 
    } 
    { 
    "message": "invoke logout request [project ProjectName]", 
    "sourceClass": "com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation", 
    "sourceMethodName": "info", 
    "level": "INFO", 
    "source": "server", 
    "threadId": 21, 
    "loggerName": "com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation", 
    "server": { 
     "ip": "--" 
    }, 
    "timestamp": "---" 
    } 
    { 
    "message": "Setting active user [project ProjectName]", 
    "sourceClass": "com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation", 
    "sourceMethodName": "info", 
    "level": "INFO", 
    "source": "server", 
    "threadId": 21, 
    "loggerName": "com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation", 
    "server": { 
     "ip": "--" 
    }, 
    "timestamp": "---" 
    } 

源代码的这种改变有助于避免此活动。 (删除challengeHandler.submitSuccess()调用)

handleChallenge method declaration

但这种方式,从challendeHandler.submitAdapterAuthentication和WL.Client.logout回调函数不叫。

Login method declaration. Show the callback function

所有活动都显示在日志包。

Client logs of the authorization process

请帮我解除这个问题。

+0

您是否看过任何现有的认证样本并与您的样本进行比较? – 2014-10-07 12:08:56

+1

我们需要更多的应用程序代码来查看它发生的位置。 – 2014-10-07 12:26:36

回答

0

在提交用户凭证之前调用Wl.Client.login(“realmname”)帮助了我。

相关问题