addAuthorization method
Method that adds Authorization header and initializes mechanism for managing refresh token logic
Implementation
@override
Future<bool> addAuthorization(
{required String jwt, required String refreshToken}) async {
final result = await _storageRepository.set(RestApiClientKeys.jwt, jwt);
_addOrUpdateHeader(
key: RestApiClientKeys.authorization, value: 'Bearer $jwt');
return result &&
await _storageRepository.set(
RestApiClientKeys.refreshToken, refreshToken);
}