Class NetrcCredentialProvider
Gets credentials from Netrc if possible. Falls back to another provider otherwise.
public class NetrcCredentialProvider : ICredentialProvider
- Inheritance
-
objectNetrcCredentialProvider
- 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
ICredentialProviderThe 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
UriThe URI that the client is providing authentication for.
previousIncorrect
boolReports that the credentials previously returned by this provider were incorrect.
Returns
- NetworkCredential