TokenMixin<T> mixin Null safety

Mixin Applications

Properties

tokenStorage TokenStorage<T>
Setter for the TokenStorage instance.
write-only
token Future<T?>
Returns the current token.
read-only
authenticationStatus Stream<AuthenticationStatus>
Returns a Stream<AuthenticationStatus> which can be used to get notified of changes to the authentication state based on the presence/absence of a token.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

clearToken() Future<void>
Clears token storage and updates the AuthenticationStatus to AuthenticationStatus.unauthenticated.
close() Future<void>
Closes StreamController.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
revokeToken() Future<void>
Delete the storaged token. and emit the AuthenticationStatus.unauthenticated if authenticationStatus not is AuthenticationStatus.unauthenticated This method should be called when the token is no longer valid.
setToken(T? token) Future<void>
Sets the internal token to the provided token and updates the AuthenticationStatus accordingly.
toString() String
A string representation of this object.
inherited

Operators

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