Push notification Worklight推送通知和SecurityTest

Push notification Worklight推送通知和SecurityTest,push-notification,adapter,ibm-mobilefirst,security-testing,Push Notification,Adapter,Ibm Mobilefirst,Security Testing,我在iOS和Android项目中使用Worklight。 我也在使用适配器,进行安全测试,并使用基于适配器的身份验证 我想使用推送通知,使用从基于适配器的身份验证功能接收的用户ID。因此,我使用相同的安全测试 现在,当我尝试对推送事件源使用安全测试时,出现了一个错误“未能从数据库部署适配器” 当我删除最后一行(securityTest)时,适配器被部署,当我添加它时,它失败 此securityTest已用于多个其他适配器函数 谁能告诉我怎么了? 提前谢谢 编辑:以下是我的安全测试定义: <

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

我想使用推送通知,使用从基于适配器的身份验证功能接收的用户ID。因此,我使用相同的安全测试

现在,当我尝试对推送事件源使用安全测试时,出现了一个错误“未能从数据库部署适配器”

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

此securityTest已用于多个其他适配器函数

谁能告诉我怎么了? 提前谢谢

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

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

在“server/conf/authenticationConfig.xml”中似乎没有定义“MySecurityTest”,请确保您在其中添加了一个具有以下名称的测试:

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

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

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

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


谢谢大家的帮助。

你能在这里添加安全测试(来自authenticationConfig.xml)吗?@KerenBaron Sela我刚刚编辑了这篇文章来添加它。安全测试在authenticationConfig.xml中定义良好,用于适配器函数时没有问题。只有当我为推送事件源添加它时,错误才会出现!您是否尝试删除适配器并重新部署它?相同的结果:FWLSE0082W:未能从数据库部署适配器(存档:'/var/folders/8p/qylwgy6j2wq4bktw4r5hxqvr0000gp/T/myAdapter5096175866595804426.adapter')。我以前见过它。。。hrrr。。。尝试删除工作区中的WorklightServerHome文件夹,然后再次部署应用程序和适配器。看看这个变通方法是否对你有效。我刚刚试过,但对我无效。我得到了相同的结果。现在我在添加poll时再次出现相同的错误:{interval:3,onPoll:gotNotificationFromBackEnd,},
   <mobileSecurityTest name="MyPushSecurityTest">
        <testUser realm="MyAuthRealm"/>
        <testDeviceId provisioningType="none"/>
    </mobileSecurityTest>