【问题标题】:How to configure authentication using Mule?如何使用 Mule 配置身份验证?
【发布时间】:2013-01-03 17:28:24
【问题描述】:

基本上是我之前的问题How to read REST service that returns JSON object and store the same into PostgreSQL using Mule ESB, Mule Studio的延伸

我有一些 REST 服务正在“http://localhost:35798/RestServiceImpl.svc/json/567”上运行

现在为了访问这些服务,我需要以管理员身份进行身份验证。凭据是

用户名:管理员

密码: pwd

流程(现有)应该能够通过 REST 处理身份验证和建立会话。

如何使用 Mule 进行身份验证?如果认证失败,流程将停止。否则在认证成功后,它将读取 REST 服务并将数据插入 PostgreSQL。

请帮忙

【问题讨论】:

  • 你读过the documentation吗?
  • 此链接用于配置入站安全性:我的印象是 OP 正在寻找出站(虽然不是 100% 确定)。

标签: authentication mule mule-studio


【解决方案1】:

将凭据放入出站端点 URI:

http://admin:pwd@localhost:35798/RestServiceImpl.svc/json/567

您当然可以使用属性来避免在 Mule 配置中对它们进行硬编码:

http://${rest.admin.username}:${rest.admin.password}@localhost:35798/RestServiceImpl.svc/json/567

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-05-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-12
相关资源
最近更新 更多