1 type derived from NetworkCredential
System.Net.Primitives (1)
30 instantiations of NetworkCredential
dotnet-svcutil-lib (8)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Security.TransportSecurity.IntegrationTests (2)
System.DirectoryServices.Protocols (6)
System.Net.Http (1)
System.Net.Requests (2)
System.ServiceModel.Http (1)
System.ServiceModel.Primitives (6)
System.ServiceModel.Primitives.Tests (3)
221 references to NetworkCredential
dotnet-svcutil-lib (48)
Microsoft.AspNetCore.Authentication.Negotiate (1)
netstandard (1)
PresentationCore (2)
System (1)
System.DirectoryServices.Protocols (18)
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (9)
62public LdapConnection(LdapDirectoryIdentifier identifier, NetworkCredential credential) : this(identifier, credential, AuthType.Negotiate)
66public unsafe LdapConnection(LdapDirectoryIdentifier identifier, NetworkCredential credential, AuthType authType)
89internal unsafe LdapConnection(LdapDirectoryIdentifier identifier, NetworkCredential credential, AuthType authType, IntPtr handle)
145public override NetworkCredential Credential
992public void Bind(NetworkCredential newCredential) => BindHelper(newCredential, needSetCredential: true);
994private void BindHelper(NetworkCredential newCredential, bool needSetCredential)
1008NetworkCredential tempCredential;
1940private static bool SameCredential(NetworkCredential oldCredential, NetworkCredential newCredential)
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (5)
17public delegate LdapConnection QueryForConnectionCallback(LdapConnection primaryConnection, LdapConnection referralFromConnection, string newDistinguishedName, LdapDirectoryIdentifier identifier, NetworkCredential credential, long currentUserToken);
18public delegate bool NotifyOfNewConnectionCallback(LdapConnection primaryConnection, LdapConnection referralFromConnection, string newDistinguishedName, LdapDirectoryIdentifier identifier, LdapConnection newConnection, NetworkCredential credential, long currentUserToken, int errorCodeFromBind);
901NetworkCredential cred = ProcessSecAuthIdentity(SecAuthIdentity);
965NetworkCredential cred = ProcessSecAuthIdentity(SecAuthIdentity);
1074private unsafe NetworkCredential ProcessSecAuthIdentity(SEC_WINNT_AUTH_IDENTITY_EX.Native* SecAuthIdentit)
System.Net (1)
System.Net.Http (27)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (7)
32public NetworkCredential Credential { get; }
35public AuthenticationChallenge(AuthenticationType authenticationType, string schemeName, NetworkCredential credential, string? challenge)
90NetworkCredential? credential = credentials.GetCredential(uri, scheme);
176private static void SetBasicAuthToken(HttpRequestMessage request, NetworkCredential credential, bool isProxyAuth)
187private static async ValueTask<bool> TrySetDigestAuthToken(HttpRequestMessage request, NetworkCredential credential, DigestResponse digestResponse, bool isProxyAuth)
218NetworkCredential? preAuthCredential = null;
223(Uri uriPrefix, NetworkCredential credential)? preAuthCredentialPair;
System\Net\Http\SocketsHttpHandler\PreAuthCredentialCache.cs (5)
14private Dictionary<CredentialCacheKey, NetworkCredential>? _cache;
16public void Add(Uri uriPrefix, string authType, NetworkCredential cred)
25_cache ??= new Dictionary<CredentialCacheKey, NetworkCredential>();
44public (Uri uriPrefix, NetworkCredential credential)? GetCredential(Uri uriPrefix, string authType)
54CredentialCacheHelper.TryGetCredential(_cache, uriPrefix, authType, out Uri? mostSpecificMatchUri, out NetworkCredential? mostSpecificMatch);
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (3)
38NetworkCredential? credentials = proxyCredentials?.GetCredential(proxyUri, proxyUri.Scheme);
65private static async ValueTask EstablishSocks5TunnelAsync(Stream stream, string host, int port, NetworkCredential? credentials, bool async)
213private static async ValueTask EstablishSocks4TunnelAsync(Stream stream, bool isVersion4a, string host, int port, NetworkCredential? credentials, bool async, CancellationToken cancellationToken)
System.Net.Mail (10)
System.Net.Primitives (27)
System\Net\CredentialCache.cs (18)
16private Dictionary<CredentialCacheKey, NetworkCredential>? _cache;
17private Dictionary<CredentialHostKey, NetworkCredential>? _cacheForHosts;
24public void Add(Uri uriPrefix, string authType, NetworkCredential cred)
44_cache ??= new Dictionary<CredentialCacheKey, NetworkCredential>();
48public void Add(string host, int port, string authenticationType, NetworkCredential credential)
70_cacheForHosts ??= new Dictionary<CredentialHostKey, NetworkCredential>();
127public NetworkCredential? GetCredential(Uri uriPrefix, string authType)
138CredentialCacheHelper.TryGetCredential(_cache, uriPrefix, authType, out _ /*uri*/, out NetworkCredential? mostSpecificMatch);
145public NetworkCredential? GetCredential(string host, int port, string authenticationType)
159NetworkCredential? match;
171public static NetworkCredential DefaultNetworkCredentials => SystemNetworkCredential.s_defaultCredential;
196private NetworkCredential? _current;
233protected virtual bool MoveNext(out NetworkCredential? current)
246private Dictionary<TKey, NetworkCredential>.ValueCollection.Enumerator _enumerator; // mutable struct field deliberately not readonly.
248public SingleTableCredentialEnumerator(CredentialCache cache, Dictionary<TKey, NetworkCredential> table) : base(cache)
258protected override bool MoveNext(out NetworkCredential current) =>
270private Dictionary<CredentialHostKey, NetworkCredential>.ValueCollection.Enumerator _enumerator; // mutable struct field deliberately not readonly.
283protected override bool MoveNext(out NetworkCredential current)
System.Net.Requests (5)
System.Net.Security (33)
System\Net\Security\NegotiateStream.cs (29)
103BeginAuthenticateAsClient((NetworkCredential)CredentialCache.DefaultCredentials, binding: null, string.Empty, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification,
106public virtual IAsyncResult BeginAuthenticateAsClient(NetworkCredential credential, string targetName, AsyncCallback? asyncCallback, object? asyncState) =>
110public virtual IAsyncResult BeginAuthenticateAsClient(NetworkCredential credential, ChannelBinding? binding, string targetName, AsyncCallback? asyncCallback, object? asyncState) =>
115NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel,
121NetworkCredential credential, ChannelBinding? binding, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel,
128AuthenticateAsServer((NetworkCredential)CredentialCache.DefaultCredentials, policy: null, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification);
131AuthenticateAsServer((NetworkCredential)CredentialCache.DefaultCredentials, policy, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification);
133public virtual void AuthenticateAsServer(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel) =>
136public virtual void AuthenticateAsServer(NetworkCredential credential, ExtendedProtectionPolicy? policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
143BeginAuthenticateAsServer((NetworkCredential)CredentialCache.DefaultCredentials, policy: null, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification, asyncCallback, asyncState);
146BeginAuthenticateAsServer((NetworkCredential)CredentialCache.DefaultCredentials, policy, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification, asyncCallback, asyncState);
149NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel,
154NetworkCredential credential, ExtendedProtectionPolicy? policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel,
161AuthenticateAsClient((NetworkCredential)CredentialCache.DefaultCredentials, binding: null, string.Empty, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification);
163public virtual void AuthenticateAsClient(NetworkCredential credential, string targetName) =>
166public virtual void AuthenticateAsClient(NetworkCredential credential, ChannelBinding? binding, string targetName) =>
170NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel) =>
174NetworkCredential credential, ChannelBinding? binding, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
181AuthenticateAsClientAsync((NetworkCredential)CredentialCache.DefaultCredentials, binding: null, string.Empty, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification);
183public virtual Task AuthenticateAsClientAsync(NetworkCredential credential, string targetName) =>
187NetworkCredential credential, string targetName,
192public virtual Task AuthenticateAsClientAsync(NetworkCredential credential, ChannelBinding? binding, string targetName) =>
196NetworkCredential credential, ChannelBinding? binding, string targetName, ProtectionLevel requiredProtectionLevel,
204AuthenticateAsServerAsync((NetworkCredential)CredentialCache.DefaultCredentials, policy: null, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification);
207AuthenticateAsServerAsync((NetworkCredential)CredentialCache.DefaultCredentials, policy, ProtectionLevel.EncryptAndSign, TokenImpersonationLevel.Identification);
209public virtual Task AuthenticateAsServerAsync(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel) =>
213NetworkCredential credential, ExtendedProtectionPolicy? policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
597NetworkCredential credential,
624NetworkCredential credential,
System.ServiceModel.Http (9)
System\ServiceModel\Channels\HttpChannelFactory.cs (4)
249(NetworkCredential credential, TokenImpersonationLevel impersonationLevel, AuthenticationLevel authenticationLevel) = await HttpChannelUtilities.GetCredentialAsync(AuthenticationScheme,
622private string AppendWindowsAuthenticationInfo(string inputString, NetworkCredential credential,
642private string GetConnectionGroupName(NetworkCredential credential, AuthenticationLevel authenticationLevel,
1389(NetworkCredential credential, TokenImpersonationLevel impersonationLevel, AuthenticationLevel authenticationLevel) = await HttpChannelUtilities.GetCredentialAsync(AuthenticationScheme,
System.ServiceModel.NetFramingBase (4)
System.ServiceModel.Primitives (29)
System.ServiceModel.Primitives.Tests (5)