Class NetrcCredentialProvider
Gets credentials from Netrc if possible. Falls back to another provider otherwise.
Implements
Namespace: NanoByte.Common.Net
Assembly: NanoByte.Common.dll
Syntax
public class NetrcCredentialProvider : Object, ICredentialProvider
Constructors
NetrcCredentialProvider(ICredentialProvider)
Creates a new Netrc credential provider.
Declaration
public NetrcCredentialProvider(ICredentialProvider innerProvider = null)
Parameters
Type | Name | Description |
---|---|---|
ICredentialProvider | innerProvider | The provider to fall back to if no suitable credentials can be found in Netrc. |
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 |