【问题标题】:Working with WSTrustChannelFactory and web proxy settings使用 WSTrustChannelFactory 和 Web 代理设置
【发布时间】:2013-12-27 22:00:05
【问题描述】:

在 WSTrustChannelFactory 文档中有使用代理的参考:

  One common pattern where the OnBehalfOf feature is used is the proxy 
  pattern where the client cannot access the STS directly but instead 
  communicates through a proxy gateway

我似乎找不到示例。
在我的一些用户的计算机中,为外部请求定义了代理。
如果 STS 在代理之后,我如何请求令牌。

目前我得到它如下:

var rst = new RequestSecurityToken{...}
IWSTrustChannelContract wsTrustChannelContract = factory.CreateChannel();
var token = wsTrustChannelContract.Issue(rst) as GenericXmlSecurityToken;

如何将其更改为使用代理?

谢谢。

【问题讨论】:

    标签: c# security proxy wif ws-trust


    【解决方案1】:

    OnBehalfOf 适用于您自己构建代理的情况 - 例如 ADFS 代理。 我也没有看到任何样本 - 但它遵循与 ActAs 相同的模式。

    这与您和您的 STS 之间可能存在的“常规”网络代理无关。

    但请看这里: How can I set an HTTP Proxy (WebProxy) on a WCF client-side Service proxy?

    【讨论】:

      猜你喜欢
      • 2017-04-21
      • 2016-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多