C# Class Microsoft.Alm.Authentication.GitHubAuthentication

Facilitates GitHub simple and two-factor authentication
Inheritance: BaseAuthentication, IGitHubAuthentication
Exibir arquivo Open project: Microsoft/Git-Credential-Manager-for-Windows Class Usage Examples

Public Properties

Property Type Description
TokenScope GitHubTokenScope

Private Properties

Property Type Description

Public Methods

Method Description
DeleteCredentials ( TargetUri targetUri ) : void

Deletes a Credential from the storage used by the authentication object.

GetAuthentication ( TargetUri targetUri, GitHubTokenScope tokenScope, ICredentialStore personalAccessTokenStore, AcquireCredentialsDelegate acquireCredentialsCallback, AcquireAuthenticationCodeDelegate acquireAuthenticationCodeCallback, AuthenticationResultDelegate authenticationResultCallback ) : BaseAuthentication

Gets a configured authentication object for 'github.com'.

GetCredentials ( TargetUri targetUri ) : Credential

Gets a Credential from the storage used by the authentication object.

GitHubAuthentication ( GitHubTokenScope tokenScope, ICredentialStore personalAccessTokenStore, AcquireCredentialsDelegate acquireCredentialsCallback, AcquireAuthenticationCodeDelegate acquireAuthenticationCodeCallback, AuthenticationResultDelegate authenticationResultCallback ) : System

InteractiveLogon ( TargetUri targetUri ) : Task

Tokens acquired are stored in the secure secret store provided during initialization.

NoninteractiveLogonWithCredentials ( TargetUri targetUri, string username, string password, string authenticationCode = null ) : Task

Tokens acquired are stored in the secure secret store provided during initialization.

SetCredentials ( TargetUri targetUri, Credential credentials ) : void

Sets a Credential in the storage used by the authentication object.

ValidateCredentials ( TargetUri targetUri, Credential credentials ) : Task

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

Method Details

DeleteCredentials() public method

Deletes a Credential from the storage used by the authentication object.
public DeleteCredentials ( TargetUri targetUri ) : void
targetUri TargetUri /// The uniform resource indicator used to uniquely identify the credentials. ///
return void

GetAuthentication() public static method

Gets a configured authentication object for 'github.com'.
public static GetAuthentication ( TargetUri targetUri, GitHubTokenScope tokenScope, ICredentialStore personalAccessTokenStore, AcquireCredentialsDelegate acquireCredentialsCallback, AcquireAuthenticationCodeDelegate acquireAuthenticationCodeCallback, AuthenticationResultDelegate authenticationResultCallback ) : BaseAuthentication
targetUri TargetUri The uniform resource indicator of the resource which requires /// authentication.
tokenScope GitHubTokenScope The desired scope of any personal access tokens acquired.
personalAccessTokenStore ICredentialStore A secure secret store for any personal access /// tokens acquired.
acquireCredentialsCallback AcquireCredentialsDelegate
acquireAuthenticationCodeCallback AcquireAuthenticationCodeDelegate
authenticationResultCallback AuthenticationResultDelegate
return BaseAuthentication

GetCredentials() public method

Gets a Credential from the storage used by the authentication object.
public GetCredentials ( TargetUri targetUri ) : Credential
targetUri TargetUri /// The uniform resource indicator used to uniquely identity the credentials. ///
return Credential

GitHubAuthentication() public method

public GitHubAuthentication ( GitHubTokenScope tokenScope, ICredentialStore personalAccessTokenStore, AcquireCredentialsDelegate acquireCredentialsCallback, AcquireAuthenticationCodeDelegate acquireAuthenticationCodeCallback, AuthenticationResultDelegate authenticationResultCallback ) : System
tokenScope GitHubTokenScope
personalAccessTokenStore ICredentialStore
acquireCredentialsCallback AcquireCredentialsDelegate
acquireAuthenticationCodeCallback AcquireAuthenticationCodeDelegate
authenticationResultCallback AuthenticationResultDelegate
return System

InteractiveLogon() public method

Tokens acquired are stored in the secure secret store provided during initialization.

public InteractiveLogon ( TargetUri targetUri ) : Task
targetUri TargetUri The unique identifier for the resource for which access is to /// be acquired.
return Task

NoninteractiveLogonWithCredentials() public method

Tokens acquired are stored in the secure secret store provided during initialization.

public NoninteractiveLogonWithCredentials ( TargetUri targetUri, string username, string password, string authenticationCode = null ) : Task
targetUri TargetUri The unique identifier for the resource for which access is to /// be acquired.
username string The username of the account for which access is to be acquired.
password string The password of the account for which access is to be acquired.
authenticationCode string The two-factor authentication code for use in access acquisition.
return Task

SetCredentials() public method

Sets a Credential in the storage used by the authentication object.
public SetCredentials ( TargetUri targetUri, Credential credentials ) : void
targetUri TargetUri /// The uniform resource indicator used to uniquely identify the credentials. ///
credentials Credential The value to be stored.
return void

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 unique identifier for the resource for which credentials /// are being validated against.
credentials Credential The credentials to validate.
return Task

Property Details

TokenScope public_oe property

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