public void AddSignature(ParameterMap parameterMap) { var signatureBaseElements = parameterMap .Select(parameter => parameter.Key + parameter.Value) .ToArray(); var simplickrConfig = _simplickrConfigurationProvider.GetConfig(); var secret = simplickrConfig.Secret; var signatureBase = secret + string.Join("", signatureBaseElements); var signature = MD5Hash(signatureBase); parameterMap.Set("api_sig", EncodingUtility.UrlEncode(signature)); }
public OAuthUrlProvider Nonce() { _parameterMap.Set("oauth_nonce", GenerateNonce()); return(this); }
public OAuthCheckTokenParameters(string token) { ParameterMap.Set("oauth_token", token); }
public GetPhotosParameters(string userId) { ParameterMap.Set("user_id", userId); }
public GetPhotosParameters Page(int page) { ParameterMap.Set("page", page.ToString(CultureInfo.InvariantCulture)); return(this); }
public GetPhotosParameters Extras(Extras extras) { ParameterMap.Set("extras", extras); return(this); }
public GetPhotosParameters SafeSearch(SafeSearch safeSearch) { ParameterMap.Set("safe_search", safeSearch); return(this); }