protected override async Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var form = new StarkBankAuthRequest
            {
                Email     = settings.Email,
                Password  = settings.Password,
                Workspace = settings.Workspace
            };

            var token = await authClient.LoginAsync(form);

            request.Headers.TryAddWithoutValidation("Access-Token", token.AccessToken);

            return(await base.SendAsync(request, cancellationToken));
        }
        protected override async Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var form = new StarkBankAuthRequest
            {
                Email     = settings.Email,
                Password  = settings.Password,
                Workspace = settings.Workspace
            };

            //Tentar obter token do cache, senão realizar request
            var token = await cache.GetObjectAsync <StarkBankTokenResponse>(CACHE_KEY);

            if (token is null)
            {
                //fazer request  do token e salvar no cache
                token = await authClient.LoginAsync(form);

                await cache.SetObjectAsync(CACHE_KEY, token, TimeSpan.FromDays(1));
            }

            request.Headers.TryAddWithoutValidation("Access-Token", token.AccessToken);

            return(await base.SendAsync(request, cancellationToken));
        }