Class AnsiCliCredentialProvider
Asks the user for NetworkCredentials using an ANSI console prompt.
Implements
Namespace: NanoByte.Common.Net
Assembly: NanoByte.Common.AnsiCli.dll
Syntax
public class AnsiCliCredentialProvider : Object, ICredentialProvider
Constructors
AnsiCliCredentialProvider(Action)
Creates a new ANSI CLI credential provider.
Declaration
public AnsiCliCredentialProvider(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(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 |