开发者

Sharepoint 2010 API for adding new Trusted Identity Token Issuer

Does anyone know a Sharepoint 2010 API for adding a new trusted identity token issue开发者_StackOverflow中文版r (aka identity provider)?

I can do this using the PS cmdlet New-SPTrustedIdentityTokenIssuer, but I need to do it from C# code.


If you open Microsoft.SharePoint.Powershell.dll in .Net Reflector it reveals that the implementation if SPCmdletNewTrustedServiceTokenIssuer is:

protected override SPTrustedAccessProvider CreateDataObject()
{
  SPSecurityTokenServiceManager localOrThrow = SPSecurityTokenServiceManager.LocalOrThrow;
  SPTrustedAccessProvider newObj = new SPTrustedAccessProvider(localOrThrow, this.Name, this.Description, this.Certificate);
  localOrThrow.TrustedAccessProviders.Add(newObj);
  return newObj;
}

SPSecurityTokenServiceManager.LocalOrThrow is internal but just calls Local

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜