Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Ui5 oData Https Basic Auth

Hi Experts,

We are developing an UI5(Fiori Like app) packed with phonegap. We want to set up basic Authentication for the app to connect to the oData provider (its not an SAP backend, just an own provider). But I cant send out the user/pw in the header. even I'm using the following:

var url = "https://urltotheserver";

  var oModel = new sap.ui.model.odata.ODataModel(url, true, "User", "Pw");

Do you have any suggestions? I want to avoid using proxy.


Former Member replied

Might be due to cross domain issue, if setting in the header as per Dennis suggestion, you might want to try setting the bWithCredentials flag.

JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.odata.ODataModel

{boolean}bWithCredentials?(optional, experimental) true when user credentials are to be included in a cross-origin request. Please note that this works only if all requests are asynchronous.
0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question