Class WindowsCredentialProvider
Gets NetworkCredentials using the Windows Credential Manager.
Inheritance
WindowsCredentialProvider
Implements
Namespace: NanoByte.Common.Net
Assembly: NanoByte.Common.dll
Syntax
public abstract class WindowsCredentialProvider : Object, ICredentialProvider
Constructors
WindowsCredentialProvider()
Declaration
protected WindowsCredentialProvider()
Methods
GetCredential(String, WindowsCredentialsFlags)
Performs the actual WindowsCredentials API call to prompt the user or the credential store for credentials.
Declaration
protected abstract NetworkCredential GetCredential(string target, WindowsCredentialsFlags flags)
Parameters
Type | Name | Description |
---|---|---|
String | target | A string identifying the target the credentials are intended for. |
WindowsCredentialsFlags | flags | Flags for configuring the prompt. |
Returns
Type | Description |
---|---|
NetworkCredential |
GetCredential(Uri, Boolean)
Returns NetworkCredentials for a specific Uri.
Declaration
public NetworkCredential GetCredential(Uri uri, bool previousIncorrect = false)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The URI that the client is providing authentication for. |
Boolean | previousIncorrect | Reports that the credentials previously returned by this provider were incorrect. |
Returns
Type | Description |
---|---|
NetworkCredential |