public SoapEditorProxy(Connections.ConnectionData connData, ServiceDescription description, XmlSchemaSet schemas) { _connData = connData; _descrip = description; _schemas = schemas; _helper = new XmlCompletionDataProvider(schemas, "http://schemas.xmlsoap.org/soap/envelope/" , "soapenv", () => "xmlns:soap=\"" + description.TargetNamespace + "\"" , e => (e.Name == "Envelope" && e.QualifiedName.Namespace == "http://schemas.xmlsoap.org/soap/envelope/") || TypeMatchesAction(e.QualifiedName, this.Action)); _baseUrl = new Uri(_connData.Url).GetLeftPart(UriPartial.Path); switch (_connData.Authentication) { case Connections.Authentication.Windows: _cred = CredentialCache.DefaultNetworkCredentials; break; case Connections.Authentication.Explicit: _cred = new NetworkCredential(_connData.UserName, _connData.Password); break; } _actionUrls = _descrip.Services.OfType <Service>() .SelectMany(s => s.Ports.OfType <Port>().Where(SoapPort)) .SelectMany(p => _descrip.Bindings[p.Binding.Name].Operations.OfType <OperationBinding>()) .Select(o => new { Name = o.Name, Address = o.Extensions.OfType <SoapOperationBinding>().First().SoapAction }) .Distinct() .ToDictionary(a => a.Name, a => a.Address); }
public SoapEditorProxy(Connections.ConnectionData connData, ServiceDescription description, XmlSchemaSet schemas) { _connData = connData; _descrip = description; _schemas = schemas; _helper = new XmlCompletionDataProvider(schemas, "http://schemas.xmlsoap.org/soap/envelope/" , "soapenv", () => "xmlns:soap=\"" + description.TargetNamespace + "\"" , e => (e.Name == "Envelope" && e.QualifiedName.Namespace == "http://schemas.xmlsoap.org/soap/envelope/") || TypeMatchesAction(e.QualifiedName, this.Action)); _baseUrl = new Uri(_connData.Url).GetLeftPart(UriPartial.Path); switch (_connData.Authentication) { case Connections.Authentication.Windows: _cred = CredentialCache.DefaultNetworkCredentials; break; case Connections.Authentication.Explicit: _cred = new NetworkCredential(_connData.UserName, _connData.Password); break; } _actionUrls = _descrip.Services.OfType<Service>() .SelectMany(s => s.Ports.OfType<Port>().Where(SoapPort)) .SelectMany(p => _descrip.Bindings[p.Binding.Name].Operations.OfType<OperationBinding>()) .Select(o => new { Name = o.Name, Address = o.Extensions.OfType<SoapOperationBinding>().First().SoapAction }) .Distinct() .ToDictionary(a => a.Name, a => a.Address); }
public V1CredsAPIConnector(string urlPrefix, System.Net.ICredentials creds = null, ProxyProvider proxy = null) { _urlPrefix = urlPrefix; _proxyProvider = proxy; _creds = creds ?? CredentialCache.DefaultCredentials; var myproxy = _proxyProvider == null ? null : _proxyProvider.CreateWebProxy(); }
public AtomLinkAsset(SyndicationLink link, SyndicationItem item, System.Net.ICredentials credentials = null) { this.link = link; this.item = item; this.credentials = credentials; this.webRoute = WebRoute.Create(Uri, Convert.ToUInt64(link.Length), credentials); }
private Proxy(Uri address, System.Net.ICredentials credentials) { this.NativeProxy = new WebProxy { Address = address, Credentials = credentials }; }
public Task PreAuthenticate(IRestClient client, IRestRequest request, System.Net.ICredentials credentials) { return(Task.Run(() => { if (!string.IsNullOrEmpty(AccessToken)) { request.AddHeader("Authorization", "Bearer " + AccessToken); } })); }
public SharepointEditorProxy(Connections.ConnectionData connData) { _connData = connData; switch (_connData.Authentication) { case Connections.Authentication.Windows: _cred = CredentialCache.DefaultNetworkCredentials; break; case Connections.Authentication.Explicit: _cred = new NetworkCredential(_connData.UserName, _connData.Password); break; } }
public VersionOneAPIConnector(string urlPrefix, System.Net.ICredentials credentials = null, ProxyProvider proxyProvider = null) { _urlPrefix = urlPrefix; _proxyProvider = proxyProvider; if (credentials != null) { _initializedWithCredentials = true; Credentials = credentials; } else { _credentialCache = new CredentialCache(); Credentials = _credentialCache; } }
public SharepointEditorProxy(Connections.ConnectionData connData) { _connData = connData; switch (_connData.Authentication) { case Connections.Authentication.Windows: _cred = CredentialCache.DefaultNetworkCredentials; break; case Connections.Authentication.Explicit: _cred = new NetworkCredential(_connData.UserName, _connData.Password); break; } var handler = new HttpClientHandler(); handler.Credentials = _cred; handler.PreAuthenticate = true; _http = new HttpClient(handler); }
public Task PreAuthenticate(IHttpClient client, IHttpRequestMessage request, System.Net.ICredentials credentials) { throw new NotImplementedException(); }
public RestClient() { _credentials = System.Net.CredentialCache.DefaultCredentials; }
public bool CanPreAuthenticate(IHttpClient client, IHttpRequestMessage request, System.Net.ICredentials credentials) { return(false); }
public bool CanPreAuthenticate(IRestClient client, IRestRequest request, System.Net.ICredentials credentials) { return(true); }
public RestClient(System.Net.ICredentials credentials) { _credentials = credentials; }
public AtomFeedCatalog(AtomFeed feed, Uri sourceUri, System.Net.ICredentials credentials = null) { this.feed = feed; this.sourceUri = sourceUri; this.credentials = credentials; }
/// <summary> /// Initializes a new instance of the <see cref="KmlLayer"/> class which will be a child of another <see cref="KmlLayer"/>. /// </summary> /// <param name="parentLayer">The parent layer.</param> internal KmlLayer(KmlLayer parentLayer) : this() { _parentLayer = parentLayer; ProjectionService = parentLayer.ProjectionService; ProxyUrl = parentLayer.ProxyUrl; VisibleLayers = parentLayer.VisibleLayers; InitializationFailed += KmlLayer_InitializationFailed; // To avoid crash and report error to parent #if !WINDOWS_PHONE MapTip = parentLayer.MapTip; #endif #if !SILVERLIGHT || WINDOWS_PHONE Credentials = parentLayer.Credentials; #endif #if !SILVERLIGHT ClientCertificate = parentLayer.ClientCertificate; #endif }
public DigestAuthenticator(System.Net.ICredentials credentials) { this.credentials = credentials; }
public AtomItemNode(AtomItem item, Uri sourceUri, System.Net.ICredentials credentials = null) { this.item = item; this.sourceUri = sourceUri; this.credentials = credentials; }
private bool getCredentials() { try { if (m_windowsAuthentication) m_credentials = System.Net.CredentialCache.DefaultCredentials; else m_credentials = new System.Net.NetworkCredential(m_userid, m_password, m_domain); hasCredentials = true; } catch (Exception ex) { string err; if (m_windowsAuthentication) err = "ERR: Unable to get credentials for Windows Authentication \n" + ex.Message; else err = "ERR: Unable to get credentials for userid: " + m_userid + " domain: " + m_domain + "\n" + ex.Message; if (ex.InnerException != null) err += ex.InnerException.Message; if (m_logStream != null) m_logStream.WriteLine(err); hasCredentials = false; } return hasCredentials; }