TokenManagerImpl class

Token manager implementation using SharedPreferences (Single Responsibility)

Implemented types

Constructors

TokenManagerImpl({Future<String?> customRefreshHandler()?})

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

clearTokens() Future<void>
Clear all tokens
override
getRefreshToken() Future<String?>
Get the current refresh token
override
getToken() Future<String?>
Get the current access token
override
hasValidTokens() Future<bool>
Check if tokens are available and valid
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshToken() Future<String?>
Refresh the access token and return the new token Returns null if refresh failed
override
saveAccessToken(String token) Future<void>
Save access token
override
saveRefreshToken(String token) Future<void>
Save refresh token
override
toString() String
A string representation of this object.
inherited

Operators

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