首页 文章

如何在Mule ESB http:request中实现HTTP基本身份验证

提问于
浏览
0

我在Mule ESB中使用HTTP请求,需要在其中实现HTTP基本身份验证 . 现在我通过使用显式授权标头来做到这一点:

<http:request config-ref="HTTP_Request_Configuration" path="/activiti-rest/service/runtime/process-instances" method="POST" doc:name="Request to BPM">
                <http:request-builder>
                    <http:header headerName="Authorization" value="Basic a2VybWl0OnBhc3N3b3JkMQ=="/>
                </http:request-builder>
            </http:request>

在Mule http:request 中有没有直接输入基本身份验证用户和密码的方法?

1 回答

  • 2

    肯定是:

    <http:request-config name="basicConfig" host="localhost" port="${httpPort}">
            <http:basic-authentication username="#[user]" password="#[password]" preemptive="#[preemptive]" />
        </http:request-config>
    

相关问题