Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 授权-.net核心中的索赔集_C#_Asp.net Mvc_Authorization_Claims Based Identity - Fatal编程技术网

C# 授权-.net核心中的索赔集

C# 授权-.net核心中的索赔集,c#,asp.net-mvc,authorization,claims-based-identity,C#,Asp.net Mvc,Authorization,Claims Based Identity,我正在将web API项目从目标框架.net framework 4.6.1迁移到.net core。API需要授权,并使用Claimset从遗留项目的请求中获取或设置索赔集合 在遗留项目中,ClaimSet是从.net core不可用的System.IdentityModel库中使用的 我尝试使用.net core中的System.Security.Claims库,但ClaimSet属性在此库中不可用 我的问题是,ClaimSet是否在.NETCore中可用?如果是,我应该如何使用它?在.ne

我正在将web API项目从目标框架
.net framework 4.6.1
迁移到
.net core
。API需要授权,并使用Claimset从遗留项目的请求中获取或设置索赔集合

在遗留项目中,ClaimSet是从.net core不可用的
System.IdentityModel
库中使用的

我尝试使用.net core中的
System.Security.Claims
库,但ClaimSet属性在此库中不可用


我的问题是,
ClaimSet
是否在.NETCore中可用?如果是,我应该如何使用它?在.net core中使用
ClaimSet
需要使用哪个库?

没有ClaimSet本身。您现在只需创建一个
Enumerable()
,它位于:microsoft.netcore.app\2.2.0\ref\netcoreapp2.2\System.Security.Claims.dll

我很久以前提出的这个问题,我忘记了解决它的方法。我还是会接受你的回答,因为这是这个问题的唯一答案。我没有测试你的建议