internal SendingRequestEventArgs(RequestData requestData, System.Net.WebHeaderCollection requestHeaders) { Debug.Assert(null != requestData, "null requestData"); Debug.Assert(null != requestHeaders, "null requestHeaders"); this.requestData = requestData; this.requestHeaders = requestHeaders; }
public void AddAuthenticationHeadersLite(RequestData requestData, WebHeaderCollection requestHeaders) { if (requestHeaders == null) { throw new ArgumentNullException("requestHeaders"); } requestHeaders[this.headerName] = this.headerValue; }
public void AddAuthenticationHeadersLite(RequestData requestData, WebHeaderCollection requestHeaders) { if (requestHeaders != null) { var xmsdate = this.GetDateHeader(); requestHeaders["x-ms-version"] = "2009-09-19"; requestHeaders["x-ms-date"] = xmsdate; requestHeaders["Authorization"] = GetAuthenticationHeaderLite(requestData, this.accountName, this.accountKey, xmsdate); } }
public void AddAuthenticationHeadersLite(RequestData requestData, WebHeaderCollection requestHeaders) { this.ValidateToken(); if (requestHeaders == null) { throw new ArgumentNullException("requestHeaders"); } requestHeaders["Authorization"] = string.Format(CultureInfo.InvariantCulture, "OAuth {0}", this.swtToken); }
public void AddAuthenticationHeadersLite(RequestData requestData, WebHeaderCollection requestHeaders) { }
private static string GetAuthenticationHeaderLite(RequestData requestData, string accountName, byte[] accountKey, string xmsdate) { var canonicalizedString = CanonicalizeHttpRequestLite(accountName, xmsdate, requestData.RequestUri); var hmacsha256 = ComputeMacSha256(accountKey, canonicalizedString); return string.Format(CultureInfo.InvariantCulture, "SharedKeyLite {0}:{1}", accountName, hmacsha256); }