/// <summary>
        /// Fetches access/refresh tokens from the provider and sends them to the data
        /// storage service to be saved for subsequent requests.
        /// </summary>
        /// <param name="requestBody">Key-value attributes to be sent with the request.</param>
        /// <returns>The response from the provider.</returns>
        private HttpResponseMessage FetchTokens(Dictionary <string, string> requestBody)
        {
            using (HttpClient client = new HttpClient())
            {
                // Build token endpoint URL.
                string url = new Uri(new Uri(_appSettings.Value.AuthBaseUri), "token").ToString();

                var clientId     = _appSettings.Value.AuthClientId;
                var clientSecret = _appSettings.Value.AuthClientSecret;

                // Set request headers.
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/x-www-form-urlencoded"));
                client.DefaultRequestHeaders.TryAddWithoutValidation(
                    "Authorization", "Basic " + Base64Encode(_appSettings.Value.AuthClientId + ":" + _appSettings.Value.AuthClientSecret));

                // Fetch tokens from auth server.
                HttpResponseMessage response = client.PostAsync(url, new FormUrlEncodedContent(requestBody)).Result;

                // Save the access/refresh tokens in the Session.
                _dataStorageService.SetTokensFromResponse(response);

                return(response);
            }
        }