We can find two separate packages in the NuGet gallery:
Both seem to receive regularly updated and have millions of downloads.
I know that System.IdentityModel.Tokens.Jwt
has a dependency on Microsoft.IdentityModel.Tokens
, but I don't know which one should I use in my ASP.NET Core 2.0 application.
I'm using Microsoft.IdentityModel.Tokens
now and it is good enough to create JWT tokens and validate them.
Do I need to add System.IdentityModel.Tokens.Jwt
to my project and change any code?
PS: I am not using Azure services in this project.
Represents the cryptographic key and security algorithms that are used to generate a digital signature.
As you pointed out System.IdentityModel.Tokens.Jwt has a dependency on Microsoft.IdentityModel.Tokens
As suggested in Link you should use the System.IdentityModel.Tokens.Jwt nuget as Microsoft.IdentityModel.Tokens is the older library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With