1 type derived from NetworkCredential
System.Net.Primitives (1)
18 instantiations of NetworkCredential
dotnet-svcutil-lib (8)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.VisualBasic.Forms (1)
Security.TransportSecurity.IntegrationTests (2)
System.Net.Http (1)
System.Net.Requests (2)
System.ServiceModel.Primitives.Tests (3)
181 references to NetworkCredential
dotnet-svcutil-lib (48)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.VisualBasic.Forms (1)
netstandard (1)
PresentationCore (2)
System (1)
System.DirectoryServices.Protocols (7)
artifacts\obj\System.DirectoryServices.Protocols\Debug\net10.0\System.DirectoryServices.Protocols.notsupported.cs (7)
167public virtual System.Net.NetworkCredential Credential { set { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); } }
323public LdapConnection(System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier, System.Net.NetworkCredential credential) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
324public LdapConnection(System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier, System.Net.NetworkCredential credential, System.DirectoryServices.Protocols.AuthType authType) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
328public override System.Net.NetworkCredential Credential { set { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); } }
335public void Bind(System.Net.NetworkCredential newCredential) { throw new System.PlatformNotSupportedException(System.SR.DirectoryServicesProtocols_PlatformNotSupported); }
457public delegate bool NotifyOfNewConnectionCallback(System.DirectoryServices.Protocols.LdapConnection primaryConnection, System.DirectoryServices.Protocols.LdapConnection referralFromConnection, string newDistinguishedName, System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier, System.DirectoryServices.Protocols.LdapConnection newConnection, System.Net.NetworkCredential credential, long currentUserToken, int errorCodeFromBind);
492public delegate System.DirectoryServices.Protocols.LdapConnection QueryForConnectionCallback(System.DirectoryServices.Protocols.LdapConnection primaryConnection, System.DirectoryServices.Protocols.LdapConnection referralFromConnection, string newDistinguishedName, System.DirectoryServices.Protocols.LdapDirectoryIdentifier identifier, System.Net.NetworkCredential credential, long currentUserToken);
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 (13)
System\Net\Mail\SmtpConnection.cs (5)
266NetworkCredential? credential = _credentials.GetCredential(host, port, _authenticationModules[i].AuthenticationType);
304private Authorization? SetContextAndTryAuthenticate(ISmtpAuthenticationModule module, NetworkCredential? credential, ContextAwareResult? context)
346internal AuthenticateCallbackContext(SmtpConnection thisPtr, ISmtpAuthenticationModule module, NetworkCredential credential, string? spn, ChannelBinding? Token)
359internal readonly NetworkCredential _credential;
754NetworkCredential? credential = _connection._credentials.GetCredential(_host, _port, module.AuthenticationType);
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.NetFramingBase (4)
System.ServiceModel.Primitives (5)
System.ServiceModel.Primitives.Tests (5)