Ibm mobilefirst Worklight轮询适配器-调用另一个适配器
在Worklight 5.0.6中,我们使用以下内容创建了eventSource:Ibm mobilefirst Worklight轮询适配器-调用另一个适配器,ibm-mobilefirst,worklight-adapters,worklight-security,Ibm Mobilefirst,Worklight Adapters,Worklight Security,在Worklight 5.0.6中,我们使用以下内容创建了eventSource: WL.Server.createEventSource({ name: 'ReminderSource', onUserSubscribe: 'userSubscribeFunc', poll: { interval: 86400, onPoll: 'getReminders' } }); 然后,getrementers过程调用其他HTTP和SQL
WL.Server.createEventSource({
name: 'ReminderSource',
onUserSubscribe: 'userSubscribeFunc',
poll: {
interval: 86400,
onPoll: 'getReminders'
}
});
然后,getrementers过程调用其他HTTP和SQL适配器来确定是否应该发送推送通知。当我们将其部署到Worklight server时,每当我们尝试在另一个适配器中调用其中一个过程时,都会看到以下错误:
只能访问资源“proc:tbl_member.getPreferences”
在域“wl_antiXSRFRealm”中进行身份验证时
我们已经尝试使用mobileSecurityTest(包括wl_antiXSRFRealm)来保护eventSource,但是我们得到了相同的错误。有没有办法让我们的轮询适配器过程以某种方式“登录”到antiXSRFRealm
我们不能使其他适配器过程不受保护,因为它们确实需要保护。antiXSRF用于客户端-服务器交叉脚本攻击检测。对于适配器过程之间的调用,它没有做太多的工作。尝试创建一个自定义安全测试,并在其中只添加用户域,而不添加antiXSRF 当我们这样做时,我们在日志中看到一条错误消息,推送通知安全测试需要antiXSRF领域。同时,我们已经解决了这个问题,将完成适配器过程所需的所有函数构建到单个适配器本身中。