Ejemplo n.º 1
0
        public BasicAuthCredentials(SecureString username, SecureString password, bool isTls = false)
        {
            if (username == null)
            {
                throw new ArgumentException("username");
            }

            if (password == null)
            {
                throw new ArgumentException("password");
            }

            _handler = CreateHandler(username, password);

            _isTls = isTls;
        }
        public BasicAuthCredentials(SecureString username, SecureString password, bool isTls = false)
        {
            if (username == null)
            {
                throw new ArgumentException("username");
            }

            if (password == null)
            {
                throw new ArgumentException("password");
            }

            _handler = CreateHandler(username, password);

            _isTls = isTls;
        }
        public BasicAuthCredentials(string username, string password, bool isTls = false)
        {
            if (string.IsNullOrEmpty(username))
            {
                throw new ArgumentException("username");
            }

            if (string.IsNullOrEmpty(password))
            {
                throw new ArgumentException("password");
            }

            _handler = CreateHandler(ConvertToSecureString(username), ConvertToSecureString(password));

            _isTls = isTls;
        }
Ejemplo n.º 4
0
        public BasicAuthCredentials(string username, string password, bool isTls = false)
        {
            if (string.IsNullOrEmpty(username))
            {
                throw new ArgumentException("username");
            }

            if (string.IsNullOrEmpty(password))
            {
                throw new ArgumentException("password");
            }

            _handler = CreateHandler(ConvertToSecureString(username), ConvertToSecureString(password));

            _isTls = isTls;
        }