Namespaces for .NET JWT token validation: System vs. Microsoft

前端 未结 2 1253
面向向阳花
面向向阳花 2020-12-15 05:49

I am trying to use JWT to authenticate a Node application to an ASP.NET Web API.

In ASP.NET, I am using .NET 4.5.1 and nuget package System.IdentityModel.Token

2条回答
  •  情书的邮戳
    2020-12-15 06:14

    In these cases, when you instance you must provide the entire namespace to inform the compiler which Class and namespace you're referencing. So, you will avoid conflicts.

    Microsoft.Identity is deprecated in NET 4.5. And you can see more here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/256c6bcd-6752-4487-b2e8-6c63f4efb9e9/difference-between-microsoftidentitymodel-and-systemidentitymodel?forum=Geneva

提交回复
热议问题