是什么System.IdentityModel与放大器之间的差异;我应该使用Microsoft.IdentityModel哪一个呢?

编程入门 行业动态 更新时间:2024-10-22 04:53:28
本文介绍了是什么System.IdentityModel与放大器之间的差异;我应该使用Microsoft.IdentityModel哪一个呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我刚开始试着写我使用的 HTTP的联合声明提供:// claimsid。 codeplex / 的例子作为我的模板。所以我启动VS2010开始我自己的项目,我注意到的第一件事是,有一个System.IdentityModel以及Microsoft.IdentityModel。当东西被添加到.NET Framework成为主流这通常发生。

I just starting out trying to write a federated claims provider I'm using the claimsid.codeplex/ examples as my template. So I start up VS2010 to begin my own project and the first thing I notice is that there is a System.IdentityModel as well as Microsoft.IdentityModel. This usually happens when stuff gets added to the .Net framework becoming 'mainstream'.

这是这里的情况?

我应该使用哪一种?

推荐答案

在使用基于声明的身份验证/授权,那么你将需要使用Microsoft.IdentityModel因为这是Windows身份验证框架(WIF)的一部分。

When using Claims Based authentication/authorization, then you will need to use Microsoft.IdentityModel as that is part of the Windows Identity Framework (WIF).

该System.IdentityModel索赔是WCF堆栈的一部分。它被用于WIF之前索赔。从我的理解Microsoft.IdentityModel什么是建立在System.IdentityModel之上。

The System.IdentityModel claim is part of the WCF stack. It was used for Claims before WIF. From what I understand Microsoft.IdentityModel is built on top of System.IdentityModel.

WIF对System.IdentityModel的依赖。根据你在做什么,你可能需要两个引用。

WIF has a dependency on System.IdentityModel. Depending on what you are doing you might need a reference to both.

这是一个例子,从要求采取键入(恰好是在这两个组件):

This is an example, taken from the Claim type (that happens to be in both assemblies):

namespace Microsoft.IdentityModel.Claims { public class Claim { public Claim(string claimType, string value); public Claim(System.IdentityModel.Claims.Claim claim, string issuer); ... } }

如果您在使用System.IdentityModel和Microsoft.IdentityModel的选择上,始终使用Microsoft.IdentityModel。

If you have the choice of using System.IdentityModel and Microsoft.IdentityModel, always use Microsoft.IdentityModel.

更多推荐

是什么System.IdentityModel与放大器之间的差异;我应该使用Microsoft.IdentityModel哪一个呢?

本文发布于:2023-11-13 00:13:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582873.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:放大器   差异   System   IdentityModel   Microsoft

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!