Hi All,
Can anybody help in getting me the code to encrypt the JWT Token in C Sharp? I could able to do the encoding but I want to encrypt payload and then generate JWT token.
I found the sample code in java but not in c sharp.
String token = Jwts.builder().setSubject("sgsdss")
.claim("dsfsd", "1234")
.setExpiration(new Date(System.currentTimeMillis() + tokenExpirationDuration))
.compressWith(CompressionCodecs.GZIP)
.signWith(SignatureAlgorithm.HS512, key)
.compact();
Here they are using GZIP to compress and then signwith. do we have similar functionality in c sharp?
Thanks.