/// <summary>
        /// Validates the headers/cookies passed in for the request
        /// </summary>
        /// <param name="requestHeaders"></param>
        /// <param name="failedReason"></param>
        /// <returns></returns>
        public static bool ValidateHeaders(HttpRequestHeaders requestHeaders, out string failedReason)
        {
            var cookieToken = requestHeaders.GetCookieValue(CsrfValidationCookieName);

            return(ValidateHeaders(
                       requestHeaders.ToDictionary(x => x.Key, x => x.Value).ToArray(),
                       cookieToken == null ? null : cookieToken,
                       out failedReason));
        }