push-notification - Worklight 推送通知和 SecurityTest

标签 push-notification adapter ibm-mobilefirst security-testing

我在我的 iOS 和 Android 项目中使用 Worklight。 我还使用适配器,进行安全测试,并使用基于适配器的身份验证

我想使用推送通知,以及从基于适配器的身份验证功能收到的用户 ID。所以我使用相同的securityTest

现在,当我尝试将安全测试与推送事件源结合使用时,出现错误“无法从数据库部署适配器

WL.Server.createEventSource({
    name : 'MyPushEventSource',
    onDeviceSubscribe : 'deviceSubscribeFunc',
    onDeviceUnsubscribe : 'deviceUnsubscribeFunc',
    securityTest : 'MySecurityTest',
});

当我删除最后一行(securityTest)时,适配器被部署,当我添加它时,它失败。

此 securityTest 已与多个其他适配器功能一起使用。

谁能帮我解释一下这是怎么回事? 提前致谢。

编辑:这是我的安全测试定义:

<securityTests>
      <customSecurityTest name="MySecurityTest">
        <test isInternalUserID="true" realm="MyAuthRealm"/>
      </customSecurityTest>
</securityTests>

最佳答案

最后,对我有用的解决方案是添加一个新的安全测试,具有相同的领域,并且类型为 mobileSecurityTest

   <mobileSecurityTest name="MyPushSecurityTest">
        <testUser realm="MyAuthRealm"/>
        <testDeviceId provisioningType="none"/>
    </mobileSecurityTest>

我认为这应该添加到当前的 Worklight 文档中,或者必须打开错误报告。

感谢大家的帮助。

关于push-notification - Worklight 推送通知和 SecurityTest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15407731/

相关文章:

ios - 如何在 swift 中为 Messenger 应用程序实现 "istyping"?

android - 使用 angularjs 和 cordova 推送通知插件恢复时路由更改的问题

javascript - IBM Worklight 6.1 - 如何显示提示对话框?

javascript - 在 MobileFirst 8 的 JS HTTP 适配器中添加方法

android - MobileFirst 7.1 加密缓存 ERROR_COULD_NOT_GENERATE_KEY

Azure 通知中心 - Windows (WNS) 错误 - WNS 凭据无效

php - iOs 推送通知与 PHP 5.2 或更低版本兼容

Android,ListView IllegalStateException : "The content of the adapter has changed but ListView did not receive a notification"

android - 单击选项卡菜单打开 fragment

android - Adapter 不断实例化 AdapterView