Table of Contents

Class WindowsCredentialProvider

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

Gets NetworkCredentials using the Windows Credential Manager.

public abstract class WindowsCredentialProvider : ICredentialProvider
Inheritance
WindowsCredentialProvider
Implements
Derived
Extension Methods

Methods

GetCredential(string, WindowsCredentialsFlags)

Performs the actual WindowsCredentials API call to prompt the user or the credential store for credentials.

protected abstract 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

GetCredential(Uri, bool)

Returns NetworkCredentials for a specific Uri.

public NetworkCredential? GetCredential(Uri uri, bool previousIncorrect = false)

Parameters

uri Uri

The URI that the client is providing authentication for.

previousIncorrect bool

Reports that the credentials previously returned by this provider were incorrect.

Returns

NetworkCredential