0

we use the https://github.com/dvsekhvalnov/jose-jwt library to generate tokens which we can then transmit to other microservices to identify and authorize the information. We also use it to get all the functionality https://www.bouncycastle.org/.

My question is how to add an expiration date to the token and how to validate it when decoding it in the code!

jps
  • 20,041
  • 15
  • 75
  • 79
  • 2
    What did you try? You just have to add the `exp` (expiration time) to the token as shown on https://github.com/dvsekhvalnov/jose-jwt#usage. And for verification see https://github.com/dvsekhvalnov/jose-jwt#aspnet-core-mvc-jwt-authentication (ValidateLifetime = true). And how is your question related to BouncyCastle? – jps Jan 18 '22 at 09:11

0 Answers0