我已将JWT令牌生成器与Microsoft身份模型一起使用,
我将代码部署在AWS中,而执行API时出现以下错误
{“响应”:空,“日志”:“”,“错误”:“ System.IO.FileLoadException:无法加载文件或程序集'Microsoft.IdentityModel.Tokens,Version = 5.4.0.0,Culture = neutral ,PublicKeyToken = 31bf3856ad364e35'。(找不到HRESULT的异常:0x80131621)\ r \ n在Controllers.AuthenticationController.Login(UserCredentials userCredentials)\ r \ n在System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start [TStateMachine](TStateMachine&stateMachine)\ r \ n在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
);