I'm trying to use the Microsoft JWT Library. I have downloaded and compiled the source code, but when I try to run it, I have the following error:
Could not load file or assembly 'Microsoft.IdentityModel.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
This is the test code:
uses
System.IdentityModel.Tokens.Jwt;
// ...
var Handler := new JwtSecurityTokenHandler;
var Payload := new JwtPayload;
var Header := new JwtHeader;
Header.Add (JwtHeaderParameterNames.X5c,
array of String (['x5c1', 'x5c2']));
var Token := Handler.WriteToken (new JwtSecurityToken (Header, Payload));
Does anyone knows how to suppress the signing or to verify the signature?
Cloning the source code then compiling it and copying the assemblies wasn't successful. Therefore, using NuGet to install the assemblies is working.
NuGet command (in Visual Studio):
PM> Install-Package System.IdentityModel.Tokens.Jwt
User contributions licensed under CC BY-SA 3.0