Esempio n. 1
0
 public RestClient(string apiKey, bool allowAllSslCertificates, ProxyConfiguration proxyConfiguration)
     : this(apiKey, allowAllSslCertificates, proxyConfiguration, new Dictionary <string, string>())
 {
 }
 public AuthenticationService(string webpageUrl, ProxyConfiguration proxyConfiguration)
 {
     client = new UnauthenticatedRestClient(proxyConfiguration);
     authenticationTemplate = new UrlTemplate(webpageUrl + UrlTemplate.ESL_AUTHENTICATION_PATH);
     webpageTemplate        = new UrlTemplate(webpageUrl);
 }
Esempio n. 3
0
        public RestClient(ApiTokenConfig apiTokenConfig, Boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration, IDictionary <string, string> headers)
        {
            this.allowAllSSLCertificates = allowAllSSLCertificates;
            this.proxyConfiguration      = proxyConfiguration;
            this.additionalHeaders       = headers;

            if (allowAllSSLCertificates)
            {
                System.Net.ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
            }
            HttpMethods.apiTokenConfig = apiTokenConfig;
        }
Esempio n. 4
0
 public RestClient(string apiKey, ProxyConfiguration proxyConfiguration)
     : this(apiKey, false, proxyConfiguration)
 {
 }
Esempio n. 5
0
 public OssClient(string apiKey, string baseUrl, bool allowAllSSLCertificates,
                  ProxyConfiguration proxyConfiguration)
     : this(apiKey, baseUrl, allowAllSSLCertificates, proxyConfiguration, new Dictionary <string, string>())
 {
 }
Esempio n. 6
0
 public OssClient(string apiKey, string baseUrl, ProxyConfiguration proxyConfiguration)
     : this(apiKey, baseUrl, false, proxyConfiguration)
 {
 }
Esempio n. 7
0
        public OssClient(ApiTokenConfig apiTokenConfig, string baseUrl, bool allowAllSSLCertificates, ProxyConfiguration proxyConfiguration, IDictionary <string, string> headers)
        {
            Asserts.NotNull(apiTokenConfig, "apiTokenConfig");
            Asserts.NotEmptyOrNull(baseUrl, "baseUrl");
            SetBaseUrl(baseUrl);
            SetWebpageUrl(baseUrl);

            configureJsonSerializationSettings();

            RestClient restClient = new RestClient(apiTokenConfig, allowAllSSLCertificates, proxyConfiguration, headers);

            init(restClient, "");
        }
Esempio n. 8
0
 public RestClient(string apiToken, Boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration)
     : this(apiToken, allowAllSSLCertificates, proxyConfiguration, new Dictionary <string, string> ())
 {
 }
Esempio n. 9
0
 public UnauthenticatedRestClient(ProxyConfiguration proxyConfiguration)
 {
     this.proxyConfiguration = proxyConfiguration;
 }