将查询字符串参数从 SharePoint 传递给 ADFS


用于

对 SharePoint 应用程序的访问者进行身份验证的 Idp 需要用于控制内容的自定义查询字符串参数。我可以在参数转到 SharePoint 的 STS 之前使用 http 模块附加参数,但在进入 adfs 之前将其删除。在《小提琴手》中,它看起来像这样:

这是 SharePoint 中/_trust 的最后一个 GET 和查询字符串参数

GET /_trust/default.aspx?trust=ADFS01&ReturnUrl=/abc/_layouts/Authenticate.aspx?Source=%2Fabc&Source=/abc&whr=https%3A%2F%2Fwww.customidp.com%2FBrandedSTS%2F&parametercode=abc HTTP/1.1
trust       ADFS01
ReturnUrl   /abc/_layouts/Authenticate.aspx?Source=/abc
Source      /abc
whr     https://www.customidp.com/BrandedSTS/
parametercode   abc

但是GOT到ADFS最终放弃了它。

GET /adfs/ls/?wa=wsignin1.0&wtrealm=urn%3awww%3aportal%3acom&wctx=https%3a%2f%2fwww.portal.com%2fabc%2f_layouts%2fAuthenticate.aspx%3fSource%3d%2fabc&whr=https%3a%2f%2fwww.customidp.com%2fBrandedSTS%2f HTTP/1.1
wa  wsignin1.0
wtrealm urn:www:portal:com
wctx    https://www.portal.com/abc/_layouts/Authenticate.aspx?Source=/abc
whr https://www.customidp.com/BrandedSTS/

我想知道是否有人知道一种方法可以让 SharePoint 的 STS 传递任何查询字符串参数,或者是否可以将 Http 模块添加到 STS 中来完成此操作。

因此,由于代码"abc"包含在wctx参数中,我们最终使用正则表达式将其从Global.asax中抓取出来,并将其附加到STS的URL中。

最新更新