【问题标题】:How to enter user credentials when calling password protected URL from a worklight adapter?从工作灯适配器调用受密码保护的 URL 时如何输入用户凭据?
【发布时间】:2014-03-14 14:23:51
【问题描述】:

我想通过 http 适配器调用休息服务。我对其余服务的 url 进行了获取请求,但它位于受密码保护的域中。 (如果我尝试从浏览器访问 url,它会弹出一个输入用户名和密码的窗口。)如何将这些凭据与我的 get 请求一起传递?在此之前我必须提出一个帖子请求吗?

【问题讨论】:

标签: rest ibm-mobilefirst worklight-adapters worklight-security


【解决方案1】:

使用 HTTP 适配器的元素。

<authentication>
  <basic/>
    <serverIdentity>
      <username> ${user} </username>
      <password> ${password} </password>
   </serverIdentity>
</authentication>  

它会在访问服务 url 时传递网络凭据。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-05-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多