cancel
Showing results for 
Search instead for 
Did you mean: 

CAP authentication

04-22-2024 4:55 PM
edb94 Explorer
2790 views 6 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hello all,

I've tried developping a CAP Node.js application and deployed to CF. But once I try to access my srv from outside (for example Postman) or with my ADFS user, it gives me 401 error.

How do I have to authenticate in order to not getting 401 error? If I do a POST to authentication URL, I have a 200 but no token, just a HTML and I don't really know how to retrieve my token.

Could you help me, please?

Best regards.

0 Likes
View Entire Topic
rileyrainey
Product and Topic Expert
Product and Topic Expert

Technically speaking, CAP typically relies on approuter/xsuaa instances to oversee authentication. That's maybe most common but that's not an absolute. 

Assuming that your CAP application deployment is front-ended by approuter, you should have a look at this post by Marius Obert,  I haven't used this in a while, but I expect the mechanism still works. Marius writes up an important caveat on the technique -- it will not work universally -- so read carefully.

edb94
Explorer
0 Likes
Hello Riley! The content was very enriching and has helped me a lot to understanding better CAP authentication and authorization. Thank you very much!!