Authenticating against AD FS from a .Net 4.5 Console App

馋奶兔 提交于 2019-12-03 07:48:24

The easiest way is to use the WSTrustChannelFactory from .NET 4.5.

See the RequestSecurityToken method here: http://leastprivilege.com/2012/11/16/wcf-and-identity-in-net-4-5-external-authentication-with-ws-trust/

After you have the token you run it through the corresponding token handler to turn it into a ClaimsPrincipal.

I have helper methods and bindings in my library on github: https://github.com/thinktecture/Thinktecture.IdentityModel.45

(look for the WCF folder, WSTrustClient and the Extensions folder).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!