IBM Worklight 6.0 - 将适配器部署到Worklight Server后出现wl_antiXSRFRealm错误 [英] IBM Worklight 6.0 - wl_antiXSRFRealm error after deploying adapter to Worklight Server

查看:162
本文介绍了IBM Worklight 6.0 - 将适配器部署到Worklight Server后出现wl_antiXSRFRealm错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用Worklight v6.0企业版进行推送通知演示。

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

作为演示的一部分,我在Worklight studio中创建了一个新的Worklight项目。

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


  • 我还将推送通知示例项目导入到同一个工作区中

  • 我将提供的authenticationConfig.xml文件从推送通知示例项目复制到我的新项目中(替换文件)

  • 我还修改了我的新项目中的application-descriptor.xml,以引用authenticationConfig.xml文件中的securityTest

如果我在测试服务器(Eclipse开发环境的一部分)上测试我的PushNotifications适配器,则适配器可以正常运行。我通过浏览器调用来测试服务器 http:// hostName:10080 / ProjectName / invoke?adapter = PushAdapter& procedure = submitNotification& parameters = [user,testdata]

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"].

但是,如果我将新的应用程序和适配器部署到我的QA Worklight服务器,我的适配器出现问题。当我从指向新服务器的浏览器再次访问适配器时,收到错误:

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-
{challenge:{wl_antiXSRFRealm:{WL-Instance-Id:i9k34qhnj7r25s8ab7v2m0sf3l}}} * /

/*-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"]


推荐答案

尝试将 securityTest =wl_unprotected添加到适配器XML中的过程。

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

另外,您写道,您正在应用程序服务器之间移动(从Eclipse开发环境到运行Worklight Server的QA环境),因此我假设您已将包含更新的authenticationConfig.xml的.war文件重新部署到QA环境的应用服务器上安装了Worklight Server吗?

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?

这篇关于IBM Worklight 6.0 - 将适配器部署到Worklight Server后出现wl_antiXSRFRealm错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆