【问题标题】:Sharepoint 2013 authenticationSharepoint 2013 身份验证
【发布时间】:2023-04-03 23:33:01
【问题描述】:

我们有一个单点登录 (SSO) 网络应用程序,用于根据用户名和密码对不同应用程序中的用户进行身份验证。然后它会生成一个随机令牌并将其保存在数据库中。

为了验证其他应用程序中的用户,我们在每个请求上运行一个 http 模块,它验证令牌并设置上下文用户,如下所示:

WindowsIdentity identity = new WindowsIdentity(currentUsername, "WindowsAuthentication");
WindowsPrincipal principal = new WindowsPrincipal(identity);
this.context.User = principal;

此方法适用于 Sharepoint 2010(配置了 Windows 身份验证)。但是,这不适用于新的 Sharepoint 2013(也配置了 Windows 身份验证)。

  1. 您知道为什么此方法在 Sharepoint 2013 中不再适用吗?
  2. 您对我可以尝试做些什么有什么建议吗?
  3. 您对 Sharepoint 2013 的不同身份验证方法有什么建议吗?

【问题讨论】:

    标签: c# sharepoint httpmodule sharepoint-2013


    【解决方案1】:

    这看起来像是为我编写自定义声明提供程序的用例。

    http://msdn.microsoft.com/en-us/library/ee537299.aspx

    基本上,当调用 sharpoint 时,它会将其重定向到自定义声明服务。在这里,您的代码将运行,它将对用户进行身份验证并发出令牌。 SP2013 将接受此令牌,因为您已在 SP2013 和声明提供者之间建立了信任关系。

    【讨论】:

      猜你喜欢
      • 2017-08-06
      • 1970-01-01
      • 2015-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-16
      • 2010-11-07
      • 2015-06-22
      相关资源
      最近更新 更多