FunctionTokenSource class final

Adapts a function into a TokenSource. The function is invoked once per request that needs a token. Callers responsible for caching and refresh implement that logic inside the closure.

Implemented types

Constructors

FunctionTokenSource(Future<String> _fetch())
Builds a source that delegates each token call to fetch.

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
token() Future<String>
Returns the token to send. May be sync via Future.value(...) or genuinely async when the implementation refreshes against an IdP.
override
toString() String
A string representation of this object.
inherited

Operators

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