我正在尝试从S4hana云中读取数据。 我在身份验证类型为 OAuth2SAMLBearerAssertion 的Cloud Foundry中配置了目标。
我还编写了一个小servlet,以使用VDM机制获取数据。
但是,当我呼叫端点时,我却遇到了错误
Caused by: com.sap.cloud.sdk.cloudplatform.connectivity.TokenRequestFailedException: Failed to get access token: no valid JWT bearer found in "Authorization" header of request.
2018-10-09T15:34:52.84+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.connectivity.TokenRequest.getCurrentJwt(TokenRequest.java:308)
2018-10-09T15:34:52.84+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.connectivity.TokenRequest.requestTokenWithUserTokenGrant(TokenRequest.java:352)
2018-10-09T15:34:52.84+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.connectivity.XsuaaService.requestAccessToken(XsuaaService.java:135)
2018-10-09T15:34:52.84+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.connectivity.XsuaaService.getServiceToken(XsuaaService.java:197)
2018-10-09T15:34:52.84+0530 [APP/PROC/WEB/0] OUT at com.sap.cloud.sdk.cloudplatform.connectivity.DestinationServiceCommand.getAccessToken(DestinationServiceCommand.java:109)
2018-10-09T15:34:52.84+0530 [APP/PROC/WEB/0] OUT ... 31 common frames omitted
答案 0 :(得分:7)
您是否设置了安全性/已配置了approuter?
错误消息表明请求中缺少JWT。