I have been trying to implement and test the application authenticity features of Worklight and have been unsuccessful in getting it working. I have reviewed every post on this site, as well as the information in the WL information center and have had no success. I am providing a detailed explanation of what I have done, as well as the results I am seeing in the hopes that someone will be able to assist me.
Environment: Worklight Studio 5.0.5 Consumer edition installed on Windows 7 Enterprise Worklight Server 5.0.5 Consumer edition installed on Windows 7 Enterprise
WL Server is running within the Websphere Application Server Liberty profile provided by the Worklight Server installation
WL Server is using the derby database provided by the installation package.
Implementation Steps:
Added (uncommented) the security test in authenticationConfig.xml
<mobileSecurityTest name="mobileTests"> <testDeviceId provisioningType="none"/> <testAppAuthenticity/> <testUser realm="wl_anonymousUserRealm"/> </mobileSecurityTest>Rebuilt and deployed the .war file to Worklight Server.
Modify initOptions.js so that "connectOnStartup : true"
Modified the application-descriptor.xml and specified the security test for the Android application and add the publicSigningKey
<android version="1.1" securityTest="mobileTests"> <worklightSettings include="false"/> <security> <encryptWebResources enabled="false"/> <testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/> <publicSigningKey>.......</publicSigningKey> </security>Rebuilt and deployed the application to WL Server.
Create the signed .apk file and uploaded it to application center.
Install the application on the physical device (Samsung Galaxy Tab 2, Android 4.1.1)
Launch the application.
When I launch the application in either "Preview" mode from WL Console or on the physical device, I end up with the same error being displayed. The error I am receiving is:
{"errorCode":"UNEXPECTED_ERROR","errorMsg":"userIdentityForAPI is null. Check your application''s authentication requirements (never, onStartup, onDemand). These settings must match to the deployed application"}
Is there something that I missed in my configuration?
Nov 4, 2013 2:21:53 PM com.worklight.gadgets.serving.GadgetAPIServlet doGetOrPost WARNING: FWLSE0009W: User identity is null. Check your application''s authentication requirements. These settings must match to the deployed application [project wlm] Nov 4, 2013 2:21:53 PM com.worklight.gadgets.serving.GadgetAPIServlet createAjaxRequestExceptionJSON SEVERE: FWLSE0020E: Ajax request exception: FWLSE0009W: User identity is null. Check your application''s authentication requirements. These settings must match to the deployed application [project wlm] [project wlm]- christianmenkens