C# Class NuGet.VisualStudio.VisualStudioCredentialProvider

Inheritance: ICredentialProvider
显示文件 Open project: monoman/NugetCracker

Public Methods

Method Description
GetCredentials ( Uri uri, IWebProxy proxy, CredentialType credentialType ) : ICredentials

Returns an ICredentials instance that the consumer would need in order to properly authenticate to the given Uri.

VisualStudioCredentialProvider ( ) : System
VisualStudioCredentialProvider ( IVsWebProxy webProxyService ) : System

Protected Methods

Method Description
InitializeCredentialProxy ( Uri uri, IWebProxy originalProxy ) : void

THIS IS KINDA HACKISH: we are forcing the static property just so that the VsWebProxy can pick up the Uri. This method is responsible for initializing the WebRequest.DefaultWebProxy to the correct Uri based on the type of request that credentials are needed for before we prompt for credentials because the VsWebProxy uses that static property as a way to display the Uri that we are connecting to.

Private Methods

Method Description
PromptForCredentials ( Uri uri ) : ICredentials

This method is responsible for retrieving either cached credentials or forcing a prompt if we need the user to give us new credentials.

Method Details

GetCredentials() public method

Returns an ICredentials instance that the consumer would need in order to properly authenticate to the given Uri.
public GetCredentials ( Uri uri, IWebProxy proxy, CredentialType credentialType ) : ICredentials
uri System.Uri
proxy IWebProxy
credentialType CredentialType
return ICredentials

InitializeCredentialProxy() protected abstract method

THIS IS KINDA HACKISH: we are forcing the static property just so that the VsWebProxy can pick up the Uri. This method is responsible for initializing the WebRequest.DefaultWebProxy to the correct Uri based on the type of request that credentials are needed for before we prompt for credentials because the VsWebProxy uses that static property as a way to display the Uri that we are connecting to.
protected abstract InitializeCredentialProxy ( Uri uri, IWebProxy originalProxy ) : void
uri System.Uri
originalProxy IWebProxy
return void

VisualStudioCredentialProvider() public method

public VisualStudioCredentialProvider ( ) : System
return System

VisualStudioCredentialProvider() public method

public VisualStudioCredentialProvider ( IVsWebProxy webProxyService ) : System
webProxyService IVsWebProxy
return System