我正在使用下面的代码生成错误的输出。
var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(key));
var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);
var permClaims = new List<Claim>();
permClaims.Add(new Claim("aud", "jitsi"));
permClaims.Add(new Claim("iss", "8B23A4BA85DE85D2922703F319496934"));
permClaims.Add(new Claim("sub", "artaticsxauuio.com"));
permClaims.Add(new Claim("room", "jd"));
//Create Security Token object by giving required parameters
var token = new JwtSecurityToken(issuer, //Issure
issuer, //Audience
permClaims,
expires: DateTime.Now.AddHours(1),
signingCredentials: credentials);
var jwt_token = new JwtSecurityTokenHandler().WriteToken(token);
我得到错误的输出:
先感谢您。我正在为 JITSI 构建这个。