Revision 79736291 trunk/Pithos.Network/CloudFilesClient.cs

b/trunk/Pithos.Network/CloudFilesClient.cs
23 23
    [Export(typeof(ICloudClient))]
24 24
    public class CloudFilesClient:ICloudClient
25 25
    {
26
        string _rackSpaceAuthUrl = "https://auth.api.rackspacecloud.com";
27
        private string _pithosAuthUrl = "https://pithos.dev.grnet.gr";
28 26

  
29 27
        private RestClient _client;
30 28
        private readonly TimeSpan _shortTimeout = TimeSpan.FromSeconds(10);
......
38 36

  
39 37
        public double DownloadPercentLimit { get; set; }
40 38
        public double UploadPercentLimit { get; set; }
41
        
42
        public string AuthUrl
43
        {
44
            get { return UsePithos ? _pithosAuthUrl : _rackSpaceAuthUrl; }
45
        }
39

  
40
        public string AuthenticationUrl { get; set; }
41

  
46 42
 
47 43
        public string VersionPath
48 44
        {
......
71 67
            if (UsePithos)
72 68
            {
73 69
                Token = ApiKey;
74
                string storageUrl = String.Format("{0}/{1}/{2}", AuthUrl, VersionPath, UserName);
70
                string storageUrl = String.Format("{0}/{1}/{2}", AuthenticationUrl, VersionPath, UserName);
75 71
                StorageUrl = new Uri(storageUrl);
76 72
            }
77 73
            else
78 74
            {
79 75

  
80
                string authUrl = String.Format("{0}/{1}", AuthUrl, VersionPath);
76
                string authUrl = String.Format("{0}/{1}", AuthenticationUrl, VersionPath);
81 77
                var authClient = new RestClient {Path = authUrl, Proxy = proxy};                
82 78

  
83 79
                authClient.AddHeader("X-Auth-User", UserName);

Also available in: Unified diff