Table of Contents

Class WindowsCliCredentialProvider

Namespace
NanoByte.Common.Net
Assembly
NanoByte.Common.dll

Asks the user for System.Net.NetworkCredentials using the Windows Credential Manager command-line interface.

public class WindowsCliCredentialProvider : WindowsCredentialProvider, ICredentialProvider
Inheritance
object
WindowsCliCredentialProvider
Implements
Inherited Members
Extension Methods

Constructors

WindowsCliCredentialProvider(Action?)

Asks the user for System.Net.NetworkCredentials using the Windows Credential Manager command-line interface.

public WindowsCliCredentialProvider(Action? beforePrompt = null)

Parameters

beforePrompt Action

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.

protected override NetworkCredential GetCredential(string target, WindowsCredentialsFlags flags)

Parameters

target string

A string identifying the target the credentials are intended for.

flags WindowsCredentialsFlags

Flags for configuring the prompt.

Returns

NetworkCredential