C# Class NuGet.Samples.VisualStudioCredentialProvider.SampleCredentialProvider

Inheritance: IVsCredentialProvider
显示文件 Open project: NuGet/Samples

Public Methods

Method Description
GetCredentialsAsync ( Uri uri, IWebProxy proxy, bool isProxyRequest, bool isRetry, bool nonInteractive, CancellationToken cancellationToken ) : Task

Get credentials for the supplied package source Uri.

Private Methods

Method Description
Authenticate ( Uri uri ) : Task
ForceHttps ( Uri uri ) : Uri

Method Details

GetCredentialsAsync() public method

Get credentials for the supplied package source Uri.
public GetCredentialsAsync ( Uri uri, IWebProxy proxy, bool isProxyRequest, bool isRetry, bool nonInteractive, CancellationToken cancellationToken ) : Task
uri System.Uri The NuGet package source Uri for which credentials are being requested.
proxy IWebProxy Web proxy to use when comunicating on the network. Null if there is no proxy /// authentication configured.
isProxyRequest bool True if this request is to get proxy authentication /// credentials. If the credential provider does not support acquiring proxy credentials, then /// null should be returned.
isRetry bool True if credentials were previously acquired for this uri, but /// the supplied credentials did not allow authorized access.
nonInteractive bool If true, then interactive prompts must not be allowed.
cancellationToken System.Threading.CancellationToken This cancellation token should be checked to determine if the /// operation requesting credentials has been cancelled.
return Task