我們正在將Worklight 6.2項目遷移到MobileFirst 7.1項目。無法連接到MobileFirst 7.1服務器
我們只是將connectOnStartup設置爲true。
我們的MF7.1 iPhone直接更新正常工作。
但是MF7.1 android app無法連接到worklight服務器。
我們得到了來自logcat的這個信息:
Client registration failed with error: {"responseHeaders":{},"status":403,"responseText":"/-secure-\n{\"reason\":\"App authenticity security check failed\"}/","responseJSON":{"reason":"App authenticity security check failed"},"invocationContext":null}
[/apps/services/api/**/android/init] failure. state: 403, response: undefined
我們authenticationConfig.xml如下所示。
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tns:loginConfiguration xmlns:tns="http://www.worklight.com/auth/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<staticResources>
<resource id="receiveSMS" securityTest="SubscribeServlet">
<urlPatterns>/receiveSMS*</urlPatterns>
</resource>
</staticResources>
<securityTests>
<customSecurityTest name="SubscribeServlet">
<test realm="wl_directUpdateRealm" step="1"/>
<test isInternalUserID="true" realm="SubscribeServlet"/>
</customSecurityTest>
</securityTests>
<realms>
<realm loginModule="rejectAll" name="SubscribeServlet">
<className>com.worklight.core.auth.ext.HeaderAuthenticator</className>
</realm>
<realm loginModule="StrongDummy" name="SampleAppRealm">
<className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
</realm>
</realms>
<loginModules>
<loginModule expirationInSeconds="-1" name="rejectAll">
<className>com.worklight.core.auth.ext.RejectingLoginModule</className>
</loginModule>
<loginModule expirationInSeconds="-1" name="StrongDummy">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule>
<loginModule expirationInSeconds="-1" name="requireLogin">
<className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
</loginModule>
</loginModules>
</tns:loginConfiguration>
我們的工作燈的版本是:7.1.0.00-20151107-1647
謝謝Idan,我在application-descriptor.xml中刪除了值,然後應用程序真實性檢查通過了!如果這個值是空的,會發生什麼? –
DannyYang
如果它是空的,真實性將失敗... –
是否意味着。這個程序不認證。並讓應用程序通過它 – DannyYang