C# Class Microsoft.Alm.Authentication.BaseVstsAuthentication

Base functionality for performing authentication operations against Visual Studio Online.
Inheritance: BaseAuthentication
ファイルを表示 Open project: Microsoft/Git-Credential-Manager-for-Windows

Public Properties

Property Type Description
ClientId string
Resource string
TokenScope VstsTokenScope

Private Properties

Property Type Description
BaseVstsAuthentication System

Public Methods

Method Description
DeleteCredentials ( TargetUri targetUri ) : void

Deletes a set of stored credentials by their target resource.

DetectAuthority ( TargetUri targetUri, System.Guid &tenantId ) : bool

Detects the backing authority of the end-point.

GetAuthentication ( TargetUri targetUri, VstsTokenScope scope, ICredentialStore personalAccessTokenStore ) : BaseAuthentication

Creates a new authentication broker based for the specified resource.

GetCredentials ( TargetUri targetUri ) : Credential

Attempts to get a set of credentials from storage by their target resource.

ValidateCredentials ( TargetUri targetUri, Credential credentials ) : Task

Validates that a set of credentials grants access to the target resource.

Protected Methods

Method Description
BaseVstsAuthentication ( VstsTokenScope tokenScope, ICredentialStore personalAccessTokenStore ) : System
GeneratePersonalAccessToken ( TargetUri targetUri, Token accessToken, bool requestCompactToken ) : Task

Generates a "personal access token" or service specific, usage resticted access token.

Private Methods

Method Description
BaseVstsAuthentication ( ICredentialStore personalAccessTokenStore, ITokenStore vstsIdeTokenCache, IVstsAuthority vstsAuthority ) : System

Method Details

BaseVstsAuthentication() protected method

protected BaseVstsAuthentication ( VstsTokenScope tokenScope, ICredentialStore personalAccessTokenStore ) : System
tokenScope VstsTokenScope
personalAccessTokenStore ICredentialStore
return System

DeleteCredentials() public method

Deletes a set of stored credentials by their target resource.
public DeleteCredentials ( TargetUri targetUri ) : void
targetUri TargetUri The 'key' by which to identify credentials.
return void

DetectAuthority() public static method

Detects the backing authority of the end-point.
public static DetectAuthority ( TargetUri targetUri, System.Guid &tenantId ) : bool
targetUri TargetUri The resource which the authority protects.
tenantId System.Guid The identity of the authority tenant; otherwise.
return bool

GeneratePersonalAccessToken() protected method

Generates a "personal access token" or service specific, usage resticted access token.
protected GeneratePersonalAccessToken ( TargetUri targetUri, Token accessToken, bool requestCompactToken ) : Task
targetUri TargetUri The target resource for which to acquire the personal access /// token for.
accessToken Token Azure Directory access token with privileges to grant access /// to the target resource.
requestCompactToken bool Generates a compact token if ; /// generates a self describing token if .
return Task

GetAuthentication() public static method

Creates a new authentication broker based for the specified resource.
public static GetAuthentication ( TargetUri targetUri, VstsTokenScope scope, ICredentialStore personalAccessTokenStore ) : BaseAuthentication
targetUri TargetUri The resource for which authentication is being requested.
scope VstsTokenScope The scope of the access being requested.
personalAccessTokenStore ICredentialStore Storage container for personal access token secrets.
return BaseAuthentication

GetCredentials() public method

Attempts to get a set of credentials from storage by their target resource.
public GetCredentials ( TargetUri targetUri ) : Credential
targetUri TargetUri The 'key' by which to identify credentials.
return Credential

ValidateCredentials() public method

Validates that a set of credentials grants access to the target resource.
public ValidateCredentials ( TargetUri targetUri, Credential credentials ) : Task
targetUri TargetUri The target resource to validate against.
credentials Credential The credentials to validate.
return Task

Property Details

ClientId public_oe property

The application client identity by which access will be requested.
public string ClientId
return string

Resource public_oe property

The Azure resource for which access will be requested.
public string Resource
return string

TokenScope public_oe property

The desired scope of the authentication token to be requested.
public VstsTokenScope,Microsoft.Alm.Authentication TokenScope
return VstsTokenScope