I am using System.IdentityModel.Tokens.Jwt
package and the below code decoding the jwt
token, but it won't give exp
value?
var handler = new JwtSecurityTokenHandler();
var decodedValue = handler.ReadJwtToken("token");
How to get exp
and compare it with the current DateTime to calculate token is expired or not?
Update:
I am using Azure.Core.AccessToken
where I have the below property,
public DateTimeOffset ExpiresOn
{
get;
}