SessionLifecycle class
The default implementation of the DescopeSessionLifecycle interface.
The SessionLifecycle class periodically checks if the session needs to be refreshed (every 30 seconds by default). The refreshSessionIfNeeded function will refresh the session if it's about to expire (within 60 seconds by default) or if it's already expired.
- Implemented types
Constructors
- SessionLifecycle(DescopeAuth _auth)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- session ↔ DescopeSession?
-
Set by the session manager whenever the current active session changes.
getter/setter pairoverride
- stalenessAllowedInterval ↔ Duration
-
getter/setter pair
- stalenessCheckFrequency ↔ Duration
-
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshSessionIfNeeded(
) → Future< void> -
Called the session manager to conditionally refresh the active session.
override
-
shouldRefresh(
DescopeSession session) → bool -
startTimer(
) → void -
stopTimer(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited