authorize method

Future<bool> authorize({
  1. required String jwt,
  2. required String refreshToken,
})

Implementation

Future<bool> authorize(
    {required String jwt, required String refreshToken}) async {
  _addOrUpdateHeader(
      key: RestApiClientKeys.authorization, value: 'Bearer $jwt');

  return await _storage.set(RestApiClientKeys.jwt, jwt) &&
      await _storage.set(RestApiClientKeys.refreshToken, refreshToken);
}