cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Connecting ui5 tooling proxy to service in BTP

felixw
Explorer
0 Kudos
835

Dear community,

I created a Fiori Elements App with the VSCode application generator. As I a base I used a service I developed in BTP. The generated applications ui5 tooling config comes in two flavors/with two config files:

- A local server mocking my service

- The default file in which my actual service is supposed to be called through the ui5 tooling proxy

The first (mocking) parts works well. When I want start my ui5 app in the config to call the actual BTP servce in the browser a window for basic auth opens. Authentification, however, is afaik usually with OAuth 2.0 in BTP.

So there must be two ways: Either opening the BTP service to be called using basic auth or configuring the ui5 tooling proxy to use an existing token (after simply opening a second browser window to authenticate). Are my thoughts so far correct and which of the alternatives are to be prefered as best practices? And how can I achieve them?

Thanks a lot!

Accepted Solutions (1)

Accepted Solutions (1)

WouterLemaire
SAP Mentor
SAP Mentor

You can try one of the following:

- setup a destination your service and configure the fiori tooling accordingly: https://www.npmjs.com/package/@sap/ux-ui5-tooling#connecting-to-a-back-end-system-with-destination-a...

(This works fine in bas but not sure if it behaves the same in vscode)

- use the ui5 middleware approuter: https://www.npmjs.com/package/ui5-middleware-approuter

 

- or setup an approuter which will authenticate you and generate a token: https://www.npmjs.com/package/@sap/approuter

Answers (0)