问题
Use Case :: Trying to mock a destination that would help us connect to a cloud S4 system behind an IDP and requires Oauth2 authentication.
I have been able to mock a local destination to connect to system behind basic authentication. We are trying to understand how to mock the additional components susch as XSUAA service that would require us to generate the token We want to use this destination to enable us to connect to remote systems locally without modifying the code developed for the cloud enviornment.
回答1:
To basically recap the discussion in the comments:
It is not easily possible to consume Cloud Foundry services locally. The SDK reads many of the necessary configuration and credentials from the VCAP_SERVICES
to communicate with those services. The only option, which is not recommended, is to copy this down locally. However, this poses security risks, as the environment variable contains sensitive information.
If the only reason is easier debugging of your application you could have a look at this answer to see how remote debugging can be set up.
来源:https://stackoverflow.com/questions/58316380/mock-a-https-destination-to-connect-to-system-behind-oauth2-authentication