.NET核心缺少HMAC和Identity dll [英] .NET core missing HMAC and Identity dlls
问题描述
我在Visual Studio 2017 RC上创建了一个新的MVC项目。 我使用的是.NET核心版本1.0.1。
我正在尝试创建JwtToken来验证Power BI Embedded Service。 但是缺少HMAC库和整个Identity dll集。 任何想法以及如何使其发挥作用。
var signingKey = new SymmetricSecurityKey(key);
            VAR signingCredentials =新SigningCredentials(新InMemorySymmetricSecurityKey(键),SecurityAlgorithms.HmacSha256Signature,SecurityAlgorithms.Sha256Digest);
          &NBSP ; VAR标记=新JwtSecurityToken(this.Issuer,this.Audience,this.Claims,DateTime.UtcNow,this.Expiration,signingCredentials);
  &NBSP ;        返回新JwtSecurityTokenHandler()WriteToken(令牌);
您好
Pritesh,
与提到的标题一样,您的案例与.Net Core更相关。请将您的案例转发给Asp.Net核心论坛以获得更好的支持。
https://forums.asp .net / 1255.aspx / 1?ASP + NET + Core
祝你好运,
Kristin
I created a new MVC project on Visual Studio 2017 RC. I am using .NET core version 1.0.1.
I am trying to create JwtToken to authenticate Power BI Embedded Service. However the HMAC library and whole Identity dlls set is missing. Any idea and how to get this working.
var signingKey = new SymmetricSecurityKey(key);
var signingCredentials = new SigningCredentials(new InMemorySymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature, SecurityAlgorithms.Sha256Digest);
var token = new JwtSecurityToken(this.Issuer, this.Audience, this.Claims, DateTime.UtcNow, this.Expiration, signingCredentials);
return new JwtSecurityTokenHandler().WriteToken(token);
Hi Pritesh,
Like your title mentioned, your case more related to .Net Core. Please repost your case to Asp.Net core forum for better support.
https://forums.asp.net/1255.aspx/1?ASP+NET+Core
Best regards,
Kristin
这篇关于.NET核心缺少HMAC和Identity dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!