问题已得到解决。
解决方案:
1-我们将authenticationConfig.xml中的MobileSecurityTest更改为customSecurityTest,如下所示,并重新部署WAR文件:
<customSecurityTest name="MobileSecurityTest">
<test realm="wl_antiXSRFRealm" step="1"/>
<test realm="wl_authenticityRealm" step="1"/>
<test realm="wl_remoteDisableRealm" step="1"/>
<test realm="wl_directUpdateRealm" mode="perSession" step="1"/>
<test realm="wl_anonymousUserRealm" isInternalUserID="true" step="1"/>
<test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" step="2"/>
</customSecurityTest>
2-在application-descriptor.xml中:
对于android,我使用了Idan所说的关于添加<packageName>
财产。
<android securityTest="MobileSecurityTest" version="1.0">
<worklightSettings include="false"/>
<security>
<encryptWebResources enabled="true"/>
<testWebResourcesChecksum enabled="true" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
<publicSigningKey>"Our public signing Key placed here"</publicSigningKey>
<packageName>ca.company.MobileTest</packageName>
</security>
</android>
对于iOS,问题在于applicationId,我们认为applicationId值是bundleId的最后一部分,
例如:如果bundleId是“com.company.Myapp”,则意味着applicaiotnId是“Myapp”,这是不正确的。
这是不正确的定义:
<iphone bundleId="ca.company.MobileTestiPhone" applicationId="MobileTestiPhone" securityTest="MobileSecurityTest" version="1.0" >
applicationId 是 worklight.plist 文件内的值,该文件位于 iPhone 或 iPad 本机文件夹内,该文件是在构建后生成的。
对于我们的应用程序来说,它具有完全不同的价值。
正确的是:
<iphone bundleId="ca.company.MobileTestiPhone" applicationId="MobileTest" securityTest="MobileSecurityTest" version="1.0" >
这就是当我们将应用程序真实性值设置为“启用、阻止”时应用程序被我们的 WL 服务器阻止的原因。
谢谢@Idan 的帮助。