private IAPIConnector MakeConnector(string path, ProxyProvider proxy = null)
        {
            var connector = new VersionOneAPIConnector(path, proxyProvider: proxy);

            connector.WithVersionOneUsernameAndPassword(_credentials.V1UserName, _credentials.V1Password);
            if (_useWindowsIntegratedAuth)
                connector.WithWindowsIntegratedAuthentication();

            return connector;
        }
        private IAPIConnector MakeConnector(string path, ProxyProvider proxy = null)
        {
            var connector = new VersionOneAPIConnector(path, proxyProvider: proxy);

            connector.WithVersionOneUsernameAndPassword(_credentials.V1UserName, _credentials.V1Password);
            if (_useWindowsIntegratedAuth)
            {
                connector.WithWindowsIntegratedAuthentication();
            }

            return(connector);
        }
        private IAPIConnector GetConnector(string path, bool anonymous)
        {
            var connector = new VersionOneAPIConnector(ApplicationUrl + path, proxyProvider: Proxy);

            if (anonymous)
                return connector;

            connector.WithVersionOneUsernameAndPassword(_username, _password);
            if (_integratedAuth)
                connector.WithWindowsIntegratedAuthentication();

            return connector;

        }
Ejemplo n.º 4
0
        private IAPIConnector GetConnector(string path, bool anonymous)
        {
            var connector = new VersionOneAPIConnector(ApplicationUrl + path, proxyProvider: Proxy);

            if (anonymous)
            {
                return(connector);
            }

            connector.WithVersionOneUsernameAndPassword(_username, _password);
            if (_integratedAuth)
            {
                connector.WithWindowsIntegratedAuthentication();
            }

            return(connector);
        }
		private IAPIConnector MakeConnector(string path, ProxyProvider proxy = null)
		{
			var connector = new VersionOneAPIConnector(path, proxyProvider: proxy);

			if (_storage != null)
				return connector.WithOAuth2(_storage);

			if (_useWindowsIntegratedAuth)
				return connector.WithWindowsIntegratedAuthentication();

			if (!string.IsNullOrWhiteSpace(_credentials.V1UserName))
				return connector
					.WithVersionOneUsernameAndPassword(_credentials.V1UserName, _credentials.V1Password);

			throw new Exception("It was not possible to create a connector with the current authentication configuration.");

		}
		private VersionOneAPIConnector PrepareConnector(string url)
		{
			var connector = new VersionOneAPIConnector(url, proxyProvider: _proxyProvider);

			if (_integratedAuth)
				connector.WithWindowsIntegratedAuthentication();
			else
				connector.WithVersionOneUsernameAndPassword(_username, _password);

            return PopulateHeaders(connector);
        }
		private VersionOneAPIConnector GetConnector(string path, bool anonymous)
		{
			var connector = new VersionOneAPIConnector(ApplicationUrl + path, proxyProvider: Proxy);

			if (anonymous)
				return connector;

			if (_integratedAuth)
				return connector.WithWindowsIntegratedAuthentication();

			if (!string.IsNullOrWhiteSpace(_username))
				return connector.WithVersionOneUsernameAndPassword(_username, _password);

			throw new Exception("It was not possible to create a connector with the current authentication configuration.");
		}