예제 #1
0
 /// <summary>
 /// UserCredential constructor
 /// </summary>
 /// <param name="authUrl">url to authenticate against</param>
 /// <param name="username">client username to use during authentication</param>
 /// <param name="api_access_key">client api access key to use during authentication</param>
 /// <param name="cloudversion">version of the cloudfiles system to access</param>
 /// <param name="accountName">client account name</param>
 /// <param name="proxyCredentials">credentials to use to obtain access via proxy</param>
 /// <returns>An instance of UserCredentials</returns>
 public UserCredentials(Uri authUrl, string username, string api_access_key, string cloudversion, string accountName, ProxyCredentials proxyCredentials)
 {
     this.authUrl          = authUrl;
     this.username         = username;
     this.api_access_key   = api_access_key;
     this.accountName      = accountName;
     this.cloudversion     = cloudversion;
     this.proxyCredentials = proxyCredentials;
 }
 /// <summary>
 /// UserCredential constructor
 /// </summary>
 /// <param name="authUrl">url to authenticate against</param>
 /// <param name="username">client username to use during authentication</param>
 /// <param name="api_access_key">client api access key to use during authentication</param>
 /// <param name="cloudversion">version of the cloudfiles system to access</param>
 /// <param name="accountName">client account name</param>
 /// <param name="proxyCredentials">credentials to use to obtain access via proxy</param>
 /// <returns>An instance of UserCredentials</returns>
 public UserCredentials(Uri authUrl, string username, string api_access_key, string cloudversion, string accountName, ProxyCredentials proxyCredentials)
 {
     this.authUrl = authUrl;
     this.username = username;
     this.api_access_key = api_access_key;
     this.accountName = accountName;
     this.cloudversion = cloudversion;
     this.proxyCredentials = proxyCredentials;
 }
        public void SetUp()
        {
            authUrl = new Uri(Constants.AUTH_URL);

            proxyCredentials = new ProxyCredentials(Constants.PROXY_ADDRESS, Constants.PROXY_USERNAME, Constants.PROXY_PASSWORD, Constants.PROXY_DOMAIN);

            userCreds = new UserCredentials(
                authUrl,
                Constants.CREDENTIALS_USER_NAME,
                Constants.CREDENTIALS_PASSWORD,
                Constants.CREDENTIALS_CLOUD_VERSION,
                Constants.CREDENTIALS_ACCOUNT_NAME,
                proxyCredentials
                );
        }
예제 #4
0
 /// <summary>
 /// Constructor - defaults Auth Url to https://api.mosso.com/auth with proxy credentials
 /// </summary>
 /// <param name="username">client username to use during authentication</param>
 /// <param name="api_access_key">client api access key to use during authentication</param>
 /// <param name="proxyCredentials">credentials to use to obtain access via proxy</param>
 public UserCredentials(string username, string api_access_key, ProxyCredentials proxyCredentials) :
     this(new Uri(Constants.US_AUTHURL), username, api_access_key, null, null, proxyCredentials)
 {
 }
        public void Setup()
        {
            proxyCredentials = new ProxyCredentials(Constants.PROXY_ADDRESS, Constants.PROXY_USERNAME, Constants.PROXY_PASSWORD, Constants.PROXY_DOMAIN);

            userCreds = new UserCredentials(
                Constants.CREDENTIALS_USER_NAME,
                Constants.CREDENTIALS_PASSWORD,
                proxyCredentials
                );
        }
 /// <summary>
 /// Constructor - defaults Auth Url to https://api.mosso.com/auth with proxy credentials
 /// </summary>
 /// <param name="username">client username to use during authentication</param>
 /// <param name="api_access_key">client api access key to use during authentication</param>
 /// <param name="proxyCredentials">credentials to use to obtain access via proxy</param>
 public UserCredentials(string username, string api_access_key, ProxyCredentials proxyCredentials)
     : this(new Uri(Constants.US_AUTHURL), username, api_access_key, null, null, proxyCredentials)
 {
 }