accessToken property
override
Access token setter to auto-refresh if it is expiring.
Implementation
// TODO check if this implementation works
@override
String get accessToken {
if (isExpiring) {
credentials.refreshToken(refreshToken).then((fresh) {
update(fresh.toJson());
storeToken(path: _localCache);
});
}
return super.accessToken;
}
inherited
String to be used in authorization header.
Implementation
String accessToken;