Beispiel #1
0
        public string GetUrl(string url, OAuthData oauthData)
        {
            string normalizedUrl;
            string normalizedRequestParameters;

            string signature = GenerateSignature(url, oauthData, out normalizedUrl, out normalizedRequestParameters);

            return(string.Concat(normalizedUrl, "?", normalizedRequestParameters, "&oauth_signature=", signature.UrlEncode()));
        }
Beispiel #2
0
 /// <summary>
 /// Generates a signature using the HMAC-SHA1 algorithm this assume that you are requesting HTTP GET
 /// </summary>
 /// <param name="url">The full url that needs to be signed including its non OAuth url parameters</param>
 /// <param name="oauthData">The OAuth Data</param>
 /// <returns>A base64 string of the hash value</returns>
 public string GenerateSignature(string url, OAuthData oauthData, out string normalizedUrl, out string normalizedRequestParameters)
 {
     return(GenerateSignature(new Uri(url), oauthData.CustomerKey, oauthData.CustomerSecret, oauthData.AccessToken, oauthData.AccessTokenSecret, "GET", this.GenerateTimeStamp(), this.GenerateNonce(), out normalizedUrl, out normalizedRequestParameters));
 }