We have an HTTP adapter with a couple of secure procedures declared as follows:
<wl:adapter name="PushAdapter" ...
.
.
<procedure name="submitNotification" securityTest="AdapterSecurityTest"/>
<procedure name="submitNotificationMass" securityTest="AdapterSecurityTest"/>
Security test is performed using adapter based authentication as below:
<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>
We need to be able to invoke the adapter procedures in HTTP using the adapter invocation service. Using the invocation service, the invocation URL should be as below:
http://<server>:<port>/<Context>/invoke?adapter=PushAdapter&procedure=submitNotification¶meters=[userId, notification text to be sent]
The invocation works as expected when the procedure security test is set to 'wl_unprotected'. But if the security test is used, the invocation returns the below response:
/*-secure-{"WL-Authentication-Failure":{"wl_remoteDisableRealm":{"reason":"Login Failed"}}}*/
The question is, how can we authenticate using the invocation service? We tried setting the authorization HTTP header with now luck.
Thank you