问题描述
我需要确定对特定应用程序的调用是来自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调用(标头)或类似方法中放置一些指示符,以使Gateway知道那些请求是从您的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应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!