Ibm mobilefirst MobileFirst 8.0-发布集成安全检查适配器和javascript HTTP Soap适配器

Ibm mobilefirst MobileFirst 8.0-发布集成安全检查适配器和javascript HTTP Soap适配器,ibm-mobilefirst,mobilefirst-adapters,mobilefirst-server,Ibm Mobilefirst,Mobilefirst Adapters,Mobilefirst Server,你好 我修改了两个适配器,一个是带有安全检查的UserLogin适配器,另一个是HttpAdapterJs(Javascript适配器),当我在Swagger(soap服务)中测试时,HttpAdapterJs工作正常 当我使用AdapterAPI从UserLogin适配器调用适配器HttpAdapterJs时,它将返回空值 HttpUriRequest req = adaptersAPI.createJavascriptAdapterRequest("HTTPAdapterJS", "getA

你好

我修改了两个适配器,一个是带有安全检查的UserLogin适配器,另一个是HttpAdapterJs(Javascript适配器),当我在Swagger(soap服务)中测试时,HttpAdapterJs工作正常

当我使用AdapterAPI从UserLogin适配器调用适配器HttpAdapterJs时,它将返回空值

HttpUriRequest req = adaptersAPI.createJavascriptAdapterRequest("HTTPAdapterJS", "getAuthenticationService", URLEncoder.encode(user_name, "UTF-8"), URLEncoder.encode(pass_word); org.apache.http.HttpResponse response = adaptersAPI.executeAdapterRequest(req); ServiceEmpImp testService = new ServiceEmpImp(); JSONObject objectJson= testService.validateAuthenticationfromService(dataAuth); HttpUriRequest req=AdapterAPI.createJavascriptAdapterRequest(“HTTPAdapterJS”、“getAuthenticationService”、URLEncoder.encode(用户名,“UTF-8”), urlcoder.encode(传递单词); org.apache.http.HttpResponse response=adaptersAPI.executeAdapterRequest(req); 然后,我读到:

  • 安全检查类不允许AdapterAPI
我的下一个解决方案也不起作用:

我创建了一个新类,调用了对象来获取数据,但它仍然返回空值

HttpUriRequest req = adaptersAPI.createJavascriptAdapterRequest("HTTPAdapterJS", "getAuthenticationService", URLEncoder.encode(user_name, "UTF-8"), URLEncoder.encode(pass_word); org.apache.http.HttpResponse response = adaptersAPI.executeAdapterRequest(req); ServiceEmpImp testService = new ServiceEmpImp(); JSONObject objectJson= testService.validateAuthenticationfromService(dataAuth); ServiceEmpImp testService=新ServiceEmpImp(); JSONObject objectJson=testService.validateAuthenticationfromService(dataAuth);
是否还有其他解决方案可以正常工作?

虽然安全检查是在适配器中实施的,但MobileFirst安全框架和适配器API是分开的,不能混合使用。因此,您不能在安全检查代码中使用适配器API,如AdpatersAPI接口,也不能在适配器资源中使用安全检查APIce代码

请参阅 有关实现安全检查和开发适配器的详细信息