validateExpIatAuthTime property

Future<bool> get validateExpIatAuthTime

Validates exp, iat, and auth_time claims using the current accurate time. The exp claim must be in the future, while iat and auth_time must be in the past.

If NTP time retrieval fails (e.g. offline, firewalled), it gracefully falls back to the system clock.

Implementation

Future<bool> get validateExpIatAuthTime async {
  DateTime now;
  try {
    now = await AccurateTime.now(isUtc: true);
  } catch (e) {
    log('NTP synchronization failed, falling back to system clock: $e');
    now = DateTime.now().toUtc();
  }
  return validateClaimsTime(now);
}