TokenInfo<T> class abstract interface Refreshing & Failures

Tells when tokens expire.

The manager compares the answer with the clock and its skew to decide whether TokenManager.validToken must refresh first.

final class JwtInfo implements TokenInfo<String> {
  const JwtInfo();

  @override
  DateTime? expiresAt(String jwt) => null; // decode the `exp` claim here
}
Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

expiresAt(T tokens) → DateTime?
Returns when tokens expire, or null when they never do.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited