IBM Worklight 6.0 - wl_antiXSRFRealm error after deploying adapter to Worklight Server

守給你的承諾、 提交于 2019-12-08 12:52:33

问题


I am currently working on a push notifications demo using Worklight v6.0 Enterprise Edition.

As part of the demo, I created a new Worklight project in Worklight studio.

  • I also imported the push notifications sample project into the same workspace
  • I copied the supplied authenticationConfig.xml file from the push notification sample project into my new project (replacing the file)
  • I also modified the application-descriptor.xml in my new project to reference the securityTest in the authenticationConfig.xml file

If I test my PushNotifications adapter on my test server (part of the Eclipse development environment), the adapter runs properly. I test the server via a browser call http://hostName:10080/ProjectName/invoke?adapter=PushAdapter&procedure=submitNotification&parameters=["user","testdata"].

However, if I deploy the new app and adapter to my QA Worklight server, I have a problem with the adapter. When I access the adapter again from a browser pointing to the new server, I receive the error:

/*-secure- {"challenges":{"wl_antiXSRFRealm":{"WL-Instance-Id":"i9k34qhnj7r25s8ab7v2m0sf3l"}}}*/

The app running on my device can connect to the server. I am hoping to have an external server write notifications for the demo using the adapter endpoint:

http://hostName:10080/ProjectName/invoke?adapter=PushAdapter&procedure=submitNotification&parameters=["user","testdata"]

回答1:


Try adding securityTest="wl_unprotected" to the procedure in the adapter XML.

Also, you wrote that you are moving between application servers (from the Eclipse development environment to a QA environment running Worklight Server) so I assume you have re-deployed the .war file containing the updated authenticationConfig.xml to the QA environment's application server that has Worklight Server installed on it?



来源:https://stackoverflow.com/questions/17766776/ibm-worklight-6-0-wl-antixsrfrealm-error-after-deploying-adapter-to-worklight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!