Class WindowsCliCredentialProvider
Asks the user for NetworkCredentials using the Windows Credential Manager command-line interface.
Implements
Inherited Members
Namespace: NanoByte.Common.Net
Assembly: NanoByte.Common.dll
Syntax
public class WindowsCliCredentialProvider : WindowsCredentialProvider, ICredentialProvider
Constructors
WindowsCliCredentialProvider(Action)
Creates a new Windows CLI credential provider.
Declaration
public WindowsCliCredentialProvider(Action beforePrompt = null)
Parameters
Type | Name | Description |
---|---|---|
Action | beforePrompt | An optional callback to be invoked right before the user is prompted for credentials |
Methods
GetCredential(String, WindowsCredentialsFlags)
Performs the actual WindowsCredentials API call to prompt the user or the credential store for credentials.
Declaration
protected override 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 |