如何区分对 SAP 的调用是来自 OData API 还是来自 Fiori 应用程序 [英] How to differentiate whether a call to SAP is from OData API or Fiori app

查看:29
本文介绍了如何区分对 SAP 的调用是来自 OData API 还是来自 Fiori 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要确定对特定应用程序的调用是来自 Odata API 调用(第三方)还是来自 Fiori 应用程序

I have a requirement to find whether the call to the specific application is from Odata API call ( Third-party ) or Fiori app

第三方应用程序将使用我们的 OData API 来调用这些交易.

Third-party applications will use our OData API to call those transactions.

我正在使用 FM GUI_GET_DESKTOP_INFO 来确定它是来自 GUI 还是 Fiori 应用程序.

I'm using the FM GUI_GET_DESKTOP_INFO to identify whether it's from GUI or Fiori app.

现在我在寻找它是来自第三方应用程序还是Fiori应用程序

Now I have conflict in finding whether it's from Third-party app or Fiori app

推荐答案

基本上,您的 Fiori 应用使用与您的 oData API 相同的 OData 服务,而在 Gateway 上,您无法告诉消费者.

Basically your Fiori app consumes the same OData service as your oData API , and at Gateway you cannot tell the consumer.

当然,对于您的 Fiori 应用程序,您可以在 HTTP 调用(标头)或类似方法中放置一些指示符,让网关知道这些请求是从您的 Fiori 应用程序发送的.但是 OData API 的用户可以做同样的事情来欺骗你的后端逻辑.

Of course for your Fiori app , you can put some indicator in the HTTP call(Header) or similar approach to let Gateway knows that those requests are sent from your Fiori App. but cusumer of OData API can do the same to trick your backend logic.

如果您有强烈的商业理由来区分消费者,请考虑使用单独的 oData API(新的 OData 服务并尽可能重用您的后端逻辑).

If you have strong business reason to differentiate the consumer, please consider to have a separate oData API( new OData service and reuse your backend logic as much as possible).

这篇关于如何区分对 SAP 的调用是来自 OData API 还是来自 Fiori 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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