Skip to main content

DEFAULT_TIME_TOLERANCE_SECS

Constant DEFAULT_TIME_TOLERANCE_SECS 

Source
pub const DEFAULT_TIME_TOLERANCE_SECS: u64 = 900;
Expand description

Default time tolerance value in seconds (15 minutes) for token verification.

This value is used to account for clock skew between systems. When verifying token expiration and validity period, this tolerance is applied to allow for slight differences in system clocks.

The default value is set to 15 minutes (900 seconds), which is a common practice for JWT implementations. This means:

  • Tokens that expired less than 15 minutes ago are still considered valid
  • Tokens that will become valid within the next 15 minutes are already considered valid

You can override this value by setting the time_tolerance field in the VerificationOptions.