public HttpClient CreateHttpClient()
        {
            var httpClientBuilder = new HttpClientBuilder();

            if (_loggerFactory != null)
            {
                httpClientBuilder.WithLogging(_loggerFactory);
            }

            var httpClient = httpClientBuilder
                             .WithDefaultHeaders()
                             .WithBearerAuthorisationHeader(new JwtBearerTokenGenerator(_configuration))
                             .Build();

            return(httpClient);
        }
        public HttpClient CreateHttpClient()
        {
            var httpClientBuilder = new HttpClientBuilder();

            if (_loggerFactory != null)
            {
                httpClientBuilder.WithLogging(_loggerFactory);
            }

            var httpClient = httpClientBuilder
                             .WithDefaultHeaders()
                             .WithManagedIdentityAuthorisationHeader(new ManagedIdentityTokenGenerator(_configuration))
                             .Build();

            httpClient.BaseAddress = new Uri(_configuration.ApiBaseUrl);

            return(httpClient);
        }