安全適配器我們有一對夫婦的聲明安全程序的HTTP適配器如下:調用在IBM使用適配器調用服務工作燈
<wl:adapter name="PushAdapter" ...
.
.
<procedure name="submitNotification" securityTest="AdapterSecurityTest"/>
<procedure name="submitNotificationMass" securityTest="AdapterSecurityTest"/>
安全測試使用基於適配器的認證如下執行:
<securityTests>
<mobileSecurityTest name="AdapterSecurityTest">
<testUser realm="MyRealm"/>
<testDeviceId provisioningType="none"/>
</mobileSecurityTest>
</securityTests>
<realms>
<realm name="MyRealm" loginModule="NonValidatingLoginModule">
<className>com.worklight.integration.auth.AdapterAuthenticator</className>
<parameter name="login-function">AuthenticationAdapter.onAuthRequired</parameter>
<parameter name="logout-function">AuthenticationAdapter.onLogout</parameter>
</realm>
</realms>
我們需要能夠使用適配器調用服務在HTTP中調用適配器過程。使用調用服務,調用URL應如下:
http://<server>:<port>/<Context>/invoke?adapter=PushAdapter&procedure=submitNotification¶meters=[userId, notification text to be sent]
調用的工作方式在程序安全測試設置爲「wl_unprotected」預期。但是如果使用安全測試,則調用返回以下響應:
/*-secure-{"WL-Authentication-Failure":{"wl_remoteDisableRealm":{"reason":"Login Failed"}}}*/
問題是,我們如何使用調用服務進行身份驗證?我們現在嘗試設置授權HTTP頭。
謝謝
爲什麼要在啓用移動安全測試時通過調用URL驗證適配器? – Karikalan 2014-10-12 19:35:34
我們有一個用例,我們希望後端系統通過使用適配器調用服務調用適配器過程來發起嚮應用程序用戶發送推送通知,但我們不希望URL發送通知是不安全的並向任何人公開。 – Hisham 2014-10-13 08:35:39