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

How to configure XSUAA in CAP + MDK?

emorales
Explorer
0 Likes
656

Good morning community, thanks for the help. I have a CAP OData V4 service running which uses authentication with XSUAA. I want this OData service to be consumed by my mobile application created with MDK. Until now I have been testing everything without authentication and it worked fine, but now I want to add this layer of security and I am finding problems that cannot be solved. I want to share some screenshots of what I have been doing and if you can guide me in being able to configure everything, it would be of great help.

My CAP service is called "InfraestructuraService" and at the moment it only requires authentication.

emorales_0-1724160348168.png

In my "packages.json" file I have the required authorization with "xsuaa"

emorales_1-1724160411029.png

In my "xs-security.json" file I configure oauth2:

emorales_2-1724160487335.png

In my app router xs-app.json I have the authentication mode set to "route".

emorales_4-1724160597254.png

In my CloudFoundry space, on my instances I have an "audit-auth" call:

emorales_5-1724160722292.png

I copied my Services Key information so I could use it in my connectivity settings in BTP:

emorales_0-1724161842216.png

By clicking on "Check Connection" I receive:

emorales_7-1724160856098.png

By going into "SAP Mobile Services" and then going to my application, within "Mobile Connectivity" I defined the following:

emorales_8-1724161102963.png

In the "APIs" section I can see my created destination which is the one I used previously in my BTP connectivity:

emorales_11-1724161288894.png

When I access my mobile application from the "Mobile Svcs" application I am not having any problems. But when I access from the web application I am receiving an error:

emorales_12-1724161496922.png

And then I get:

emorales_13-1724161520423.png

Can someone help me? I feel like everything related to XSUAA is getting more complicated than I would like.

 

 

Accepted Solutions (0)

Answers (0)