Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There could be several reasons why the expiry time in Micronaut JWT is not changing. Some possible reasons are:

  1. The expiry time is hard-coded: If the expiry time is hard-coded in the code or the configuration, then it will not change even if the system clock changes. Make sure that the expiry time is set dynamically using appropriate libraries or methods.

  2. The clock skew is too large: JWT tokens have a certain clock skew to account for time differences between systems. If the clock skew is too large, the expiry time may not change even if the system clock changes. Make sure that the clock skew is set appropriately in the JWT configuration.

  3. The token is cached: If the token is cached, then the expiry time may not change until the cache is invalidated. Make sure that the token is not being cached for a long period and is invalidated when necessary.

  4. The token is not being refreshed: If the token is not being refreshed, then the expiry time may not change even if the system clock changes. Make sure that the token is being refreshed at appropriate intervals and before it expires.