예제 #1
0
        /// <summary>
        /// Used to store the user's proxy credentials.
        /// If this is an web application, a safer form of storing the user's
        /// credentials might be considered.
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <param name="domain"></param>
        public void StoreCredentials(string userName, string password, string domain = null)
        {
            UserCredentials credentials = new UserCredentials
                                              {
                                                  Domain = domain,
                                                  Password = password,
                                                  UserName = userName
                                              };

            CacheLayer.Add(credentials, "Credentials");
        }
예제 #2
0
 public void Setup()
 {
     _mock = new Mock<ProxyHelper>();
     _userCredentials = new UserCredentials {Domain = "", Password = "******", UserName = "******"};
     _trueProxyDetails = new ProxyDetails {Result = "true", Successful = true, WebClient = null};
     _falseProxyDetails = new ProxyDetails { Result = "false", Successful = false, WebClient = null };
 }