Table of Contents

Class NetrcCredentialProvider

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

Gets credentials from Netrc if possible. Falls back to another provider otherwise.

public class NetrcCredentialProvider : ICredentialProvider
Inheritance
object
NetrcCredentialProvider
Implements
Extension Methods

Constructors

NetrcCredentialProvider(ICredentialProvider?)

Gets credentials from Netrc if possible. Falls back to another provider otherwise.

public NetrcCredentialProvider(ICredentialProvider? innerProvider = null)

Parameters

innerProvider ICredentialProvider

The provider to fall back to if no suitable credentials can be found in Netrc.

Methods

GetCredential(Uri, bool)

Returns System.Net.NetworkCredentials for a specific System.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