Worklight 5.0.5 Application Authenticity
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?
I am receiving the exact same error. I have done everything exactly as you have. The only difference in our environments is that I am deploying to tomcat and I am using DB2 as the database.
ReplyDeleteYour post is the first one I have seen that mentions the "userIdentityForAPI is null" error. I hope we can get an answer soon!
Correction, I am am using Worklight Studio 6.0.0 Consumer Edition as well as Worklight Server 6.0.0 Consumer Edition.
ReplyDelete