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
This is a follow up to the lately closed issue about "OAuth2JWTBearer" destination : #682
The suggested solution was fetching destinations via DestinationAccessor . In fact that helped us getting "Authorization" header for "OAuth2JWTBearer" destination, however we were not able to get unauthenticated destinations details anymore.
We have noticed that a DestinationAccessException was raised when fetching unauthenticated destinations : com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to read authentication token of destination 'xxxxxxx'. The destination service responded with an error: 'access_denied'. In case only the properties of a destination should be accessed, without performing authorization flows, please use the 'getDestinationProperties' method on 'DestinationService' instead.
In the other hand,we were able to get both authenticated and unauthenticated destination when querying the destination via REST client "v1/destination/v1/destination-configuration/v1/destinations/xxxxxx"
We believe that this behavior was related to the upgrade to SDK5 , because before we did the upgrade we used to fetch both authenticated and unauthenticated destination using Destination destination = DestinationAccessor.getLoader().tryGetDestination(destinationName).get();
So, is there any method provided by cloud-sdk-java to overcome this limitation ? any hint fro your side will be appreciated .
Best regards,
Tesnim
The text was updated successfully, but these errors were encountered:
Ask the Question
Hello Team,
This is a follow up to the lately closed issue about "OAuth2JWTBearer" destination : #682
The suggested solution was fetching destinations via DestinationAccessor . In fact that helped us getting "Authorization" header for "OAuth2JWTBearer" destination, however we were not able to get unauthenticated destinations details anymore.
We have noticed that a DestinationAccessException was raised when fetching unauthenticated destinations :
com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException: Failed to read authentication token of destination 'xxxxxxx'. The destination service responded with an error: 'access_denied'. In case only the properties of a destination should be accessed, without performing authorization flows, please use the 'getDestinationProperties' method on 'DestinationService' instead.
In the other hand,we were able to get both authenticated and unauthenticated destination when querying the destination via REST client
"v1/destination/v1/destination-configuration/v1/destinations/xxxxxx"
We believe that this behavior was related to the upgrade to SDK5 , because before we did the upgrade we used to fetch both authenticated and unauthenticated destination using
Destination destination = DestinationAccessor.getLoader().tryGetDestination(destinationName).get();
So, is there any method provided by cloud-sdk-java to overcome this limitation ? any hint fro your side will be appreciated .
Best regards,
Tesnim
The text was updated successfully, but these errors were encountered: