简体   繁体   English

How do I pass a bearer token in a WSO2 Integration Studio ESB Application to be able to call an API in WSO2 API Publisher?

[英]How do I pass a bearer token in a WSO2 Integration Studio ESB Application to be able to call an API in WSO2 API Publisher?

I am new to WSO2 and would like to call an API at the end of a WSO2 ESB application that transfers files to be able to send a notification to a messaging service which is what the API does. I am new to WSO2 and would like to call an API at the end of a WSO2 ESB application that transfers files to be able to send a notification to a messaging service which is what the API does. I am unsure of how to pass the bearer token in the xml of the ESB application to call the api endpoint and authorize the request.我不确定如何在 ESB 应用程序的 xml 中传递不记名令牌来调用 api 端点并授权请求。

You can use a property mediator to send an Authorization header您可以使用属性调解器发送授权 header

<property name="Authorization" value="Bearer 1234-1234-11111" scope="transport" />

Put this before the <endpoint> block and it'll send an Authorization Header with the Bearer token 1234-1234-11111 to the backend.将其放在<endpoint>块之前,它将向后端发送带有承载令牌 1234-1234-11111 的授权 Header。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM