Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9190

UI5 app + XS backend services - how to authenticate?

$
0
0

Hello everyone.

 

I have developed some simple XS services that constitute a REST interface to couple of database tables. I also have an SAPUI5 application that, among other things, uses these REST services to fetch data.

Both are running on the same trial HCP account. Accessing either inside a browser correctly authenticates the user (using SAML I think?)

 

However, accessing URLs of the XS services from the UI5 js code fails. The error looks like this:

"DOMException: Failed to execute 'send' on 'XMLHttpRequest': Failed to load '<XS service URL here>'. Some 'NetworkError', but no detailed information.

 

If I first visit an XS service and authenticate there, then the SAPUI5 app can also access the XS services without problem. This is obviously not a good solution.

 

How can I make it so that the authentication mechanism that SAPUI5 uses is also applied to the connection with the backend XS REST services?

Ideally, it has something to do with configuring a proper destination, but the various options available in the cockpit are not described in sufficient detail. Activating changes to a destination in the cockpit takes a while and honestly I have no idea if the options even change anything. For reference, trying to use a destination results in this message returned from the rewritten destination URL: "Cannot open tunnel with id account:///d050674trial"

HANA Cloud Connector (if that is relevant) is not an option.

 

Thanks in advance for your time!

- Vesso

 

EDIT: This is the xsaccess config of the XS services (relevant parts):

"exposed" : true,

"authentication" : [{"method":"Basic"}],

"prevent_xsrf" : false,


Viewing all articles
Browse latest Browse all 9190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>