this["Accounts"] = value;
}
}
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("https://pithos.dev.grnet.gr")]
+ public string PithosAuthenticationUrl {
+ get {
+ return ((string)(this["PithosAuthenticationUrl"]));
+ }
+ }
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("https://auth.api.rackspacecloud.com")]
+ public string CloudfilesAuthenticationUrl {
+ get {
+ return ((string)(this["CloudfilesAuthenticationUrl"]));
+ }
+ }
}
}
</ArrayOfAccountSettings>
</Value>
</Setting>
+ <Setting Name="PithosAuthenticationUrl" Type="System.String" Scope="Application">
+ <Value Profile="(Default)">https://pithos.dev.grnet.gr</Value>
+ </Setting>
+ <Setting Name="CloudfilesAuthenticationUrl" Type="System.String" Scope="Application">
+ <Value Profile="(Default)">https://auth.api.rackspacecloud.com</Value>
+ </Setting>
</Settings>
</SettingsFile>
\ No newline at end of file
Monitor.UserName = account.AccountName;
Monitor.ApiKey = account.ApiKey;
Monitor.UsePithos = account.UsePithos;
+ var appSettings = Properties.Settings.Default;
+ Monitor.AuthenticationUrl = account.UsePithos
+ ? appSettings.PithosAuthenticationUrl
+ : appSettings.CloudfilesAuthenticationUrl;
Monitor.RootPath = Path.Combine(Settings.PithosPath, account.RootPath??"");
}
<setting name="PithosSite" serializeAs="String">
<value>http://pithos.dev.grnet.gr/pithos.html</value>
</setting>
+ <setting name="PithosAuthenticationUrl" serializeAs="String">
+ <value>https://pithos.dev.grnet.gr</value>
+ </setting>
+ <setting name="CloudfilesAuthenticationUrl" serializeAs="String">
+ <value>https://auth.api.rackspacecloud.com</value>
+ </setting>
</Pithos.Client.WPF.Properties.Settings>
</applicationSettings>
</configuration>
\ No newline at end of file
private void EnsurePithosContainers()
{
CloudClient.UsePithos = this.UsePithos;
+ CloudClient.AuthenticationUrl = this.AuthenticationUrl;
CloudClient.Authenticate(UserName, ApiKey);
var pithosContainers = new[] {PithosContainer, TrashContainer};
}
}
+ public string AuthenticationUrl { get; set; }
+
private Uri ProxyFromSettings()
{
if (Settings.UseManualProxy)
try
{
CloudClient.UsePithos = this.UsePithos;
+ CloudClient.AuthenticationUrl = this.AuthenticationUrl;
CloudClient.Authenticate(UserName, ApiKey);
StartListening(RootPath);
{
if (state.Skip)
return state;
- string path = state.Path;
+ string path = state.Path.ToLower();
string fileName = Path.GetFileName(path);
+ //Bypass deleted files, unless the status is Deleted
+ if (!(File.Exists(path) || state.Status == FileStatus.Deleted))
+ {
+ state.Skip = true;
+ this.StatusKeeper.RemoveFileOverlayStatus(path);
+ return state;
+ }
+
switch(state.Status)
{
case FileStatus.Created:
Uri Proxy { get; set; }
double DownloadPercentLimit { get; set; }
double UploadPercentLimit { get; set; }
+ string AuthenticationUrl { get; set; }
+
-
IList<ContainerInfo> ListContainers();
IList<ObjectInfo> ListObjects(string container);
IList<ObjectInfo> ListObjects(string container, string folder);
public double DownloadPercentLimit { get; set; }
public double UploadPercentLimit { get; set; }
+ public string AuthenticationUrl { get; set; }
+
public bool UsePithos { get; set; }
public void Authenticate(string userName, string apiKey)
[Export(typeof(ICloudClient))]
public class CloudFilesClient:ICloudClient
{
- string _rackSpaceAuthUrl = "https://auth.api.rackspacecloud.com";
- private string _pithosAuthUrl = "https://pithos.dev.grnet.gr";
private RestClient _client;
private readonly TimeSpan _shortTimeout = TimeSpan.FromSeconds(10);
public double DownloadPercentLimit { get; set; }
public double UploadPercentLimit { get; set; }
-
- public string AuthUrl
- {
- get { return UsePithos ? _pithosAuthUrl : _rackSpaceAuthUrl; }
- }
+
+ public string AuthenticationUrl { get; set; }
+
public string VersionPath
{
if (UsePithos)
{
Token = ApiKey;
- string storageUrl = String.Format("{0}/{1}/{2}", AuthUrl, VersionPath, UserName);
+ string storageUrl = String.Format("{0}/{1}/{2}", AuthenticationUrl, VersionPath, UserName);
StorageUrl = new Uri(storageUrl);
}
else
{
- string authUrl = String.Format("{0}/{1}", AuthUrl, VersionPath);
+ string authUrl = String.Format("{0}/{1}", AuthenticationUrl, VersionPath);
var authClient = new RestClient {Path = authUrl, Proxy = proxy};
authClient.AddHeader("X-Auth-User", UserName);
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Pithos"
"ProductCode" = "8:{6DF108D9-D8FB-4438-9B83-A06A272FF56D}"
- "PackageCode" = "8:{9A7D1522-2F63-4DCE-B974-6185A1FC6DA4}"
+ "PackageCode" = "8:{FE169482-E9D7-4D7B-BD3D-0101348C3EBF}"
"UpgradeCode" = "8:{9D7BB283-458F-4124-A847-E42AFC9D5514}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Test|Mixed Platforms.Build.0 = Test|Any CPU
{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}.Test|x86.ActiveCfg = Test|Any CPU
{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4D9406A3-50ED-4672-BB97-A0B3EA4946FE}.Debug|x86.ActiveCfg = Debug|Any CPU
{B633FE8C-B40E-4122-A763-F94C8B1A70F8}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{B633FE8C-B40E-4122-A763-F94C8B1A70F8}.Test|x86.ActiveCfg = Release|Any CPU
{C6251981-3C49-404B-BB5B-9732887388D2}.Debug|Any CPU.ActiveCfg = Debug
+ {C6251981-3C49-404B-BB5B-9732887388D2}.Debug|Any CPU.Build.0 = Debug
{C6251981-3C49-404B-BB5B-9732887388D2}.Debug|Mixed Platforms.ActiveCfg = Debug
{C6251981-3C49-404B-BB5B-9732887388D2}.Debug|x86.ActiveCfg = Debug
{C6251981-3C49-404B-BB5B-9732887388D2}.Release|Any CPU.ActiveCfg = Release