public static string SetJwtEncode(CarGateLoginInputDto payload, string sign) { IJwtAlgorithm algorithm = new HMACSHA256Algorithm(); IJsonSerializer serializer = new JsonNetSerializer(); IBase64UrlEncoder urlEncoder = new JwtBase64UrlEncoder(); IJwtEncoder encoder = new JwtEncoder(algorithm, serializer, urlEncoder); var token = encoder.Encode(payload, sign); return token; }
标签:urlEncoder,string,C#,jwt,token,new,payload From: https://www.cnblogs.com/fanyang1/p/17353034.html