Exemplo n.º 1
0
        private string GetAuthenticationUrl(string permission)
        {
            string apiKey = flickrSettingsProvider.GetCurrentFlickrSettings().ApiKey;
            string sig = new CommonRepository(elementProxy).GetSignature(string.Empty, false, "perms", permission);

            StringBuilder builder = new StringBuilder(Helper.AUTH_URL + "?api_key=" + apiKey);

            builder.Append("&perms=" + permission);
            builder.Append("&api_sig=" + sig);

            return builder.ToString();
        }
Exemplo n.º 2
0
 private string CreateWebFrobIfNecessary(out bool authenticated)
 {
     IRepositoryBase repositoryBase = new CommonRepository(elementProxy);
     // if it is a redirect by flickr then take the frob from url.
     if (!string.IsNullOrEmpty(HttpContext.Current.Request["frob"]))
     {
         authenticated = false;
         return HttpContext.Current.Request["frob"];
     }
     else
     {
         authenticated = true;
         return repositoryBase.GetFrob();
     }
 }