How to validate ADFS SAML token

后端 未结 2 1834
失恋的感觉
失恋的感觉 2021-02-04 15:02

I am currently generating SAML tokens from ADFS like this:

 WSTrustChannelFactory factory = null;
        try
        {
            // use a UserName Trust Bindi         


        
2条回答
  •  佛祖请我去吃肉
    2021-02-04 15:32

    It's much simpler! For web sites you use WIF (assuming you are using .NET) and then you federate the app with ADFS. (There's a wizard included in the WIF SDK). Everything is taken care of. Parsing, validation, etc. is done by the framework. Your app would deal with users in the regular way: this.User.Name , this.User.IsInRole("admin"), etc.

    The scenario is documented here.

提交回复
热议问题