isValid method

bool isValid({
  1. DateTime? now,
})

Whether the access token is still valid.

Implementation

bool isValid({DateTime? now}) {
  final current = now ?? DateTime.now().toUtc();
  return current.isBefore(expiresAt.toUtc());
}