I have used JWT Token generator with Microsoft Identity Model,
I deploy the code in AWS, While execute the API got below error
{"response":null,"logs":"","error":"System.IO.FileLoadException: Could not load file or assembly 'Microsoft.IdentityModel.Tokens, Version=5.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)\r\n at Controllers.AuthenticationController.Login(UserCredentials userCredentials)\r\n at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Controllers.AuthenticationController.Login(UserCredentials userCredentials)\r\n","isSuccess":false}
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("KEY"));
var creds = new SigningCredentials(key,
SecurityAlgorithms.HmacSha256);
var expires = DateTime.Now.AddDays(Convert.ToDouble("1"));
var token = new JwtSecurityToken(
"https://domainname",
"https://domainname",
claims,
expires: expires,
signingCredentials: creds
);
User contributions licensed under CC BY-SA 3.0