You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thank you for this example project. Helped me a lot to get things up and running with a CAP project and AzureAD integration (also using the PostgreSQL adapter and no deployment to BTP).
I did not want to miss all the OData V4 magic in CAP, so I found a way to get around the issue, that the SAPUI5 ODataModel (V2 and V4) append the Authorization header to all requests, including the ones collected within a $batch request.
So instead of deactivating batch like you did here
it is possible to hook into all jQuery ajax calls and remove the Authorization header from the $batch request body.
Just place this somewhere in the app initialization code (e.g. Component->init):
Hi @gregorwolf,
thank you for this example project. Helped me a lot to get things up and running with a CAP project and AzureAD integration (also using the PostgreSQL adapter and no deployment to BTP).
I did not want to miss all the OData V4 magic in CAP, so I found a way to get around the issue, that the SAPUI5 ODataModel (V2 and V4) append the Authorization header to all requests, including the ones collected within a
$batch
request.So instead of deactivating batch like you did here
cap-azure-ad-b2c/app/de.linuxdozent.capazure.ui5/webapp/controller/MainView.controller.js
Line 63 in 4a0a75c
it is possible to hook into all jQuery ajax calls and remove the Authorization header from the
$batch
request body.Just place this somewhere in the app initialization code (e.g.
Component->init
):This way all backend requests (I am only using V4) work perfectly fine and the bearer token is only available in the request header.
The text was updated successfully, but these errors were encountered: