Class WindowsCredentialProvider
Gets System.Net.NetworkCredentials using the Windows Credential Manager.
public abstract class WindowsCredentialProvider : ICredentialProvider
- Inheritance
-
objectWindowsCredentialProvider
- Implements
- Derived
- Extension Methods
Methods
GetCredential(string, WindowsCredentialsFlags)
Performs the actual WindowsCredentials API call to prompt the user or the credential store for credentials.
[SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "flags", Justification = "Native API")]
protected abstract NetworkCredential? GetCredential(string target, WindowsCredentialsFlags flags)
Parameters
targetstringA string identifying the target the credentials are intended for.
flagsWindowsCredentialsFlagsFlags for configuring the prompt.
Returns
- NetworkCredential
GetCredential(Uri, bool)
Returns System.Net.NetworkCredentials for a specific System.Uri.
public NetworkCredential? GetCredential(Uri uri, bool previousIncorrect = false)
Parameters
uriUriThe URI that the client is providing authentication for.
previousIncorrectboolReports that the credentials previously returned by this provider were incorrect.
Returns
- NetworkCredential