C# Class Microsoft.Alm.Authentication.GitHubAuthentication

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

Méthodes publiques

Свойство Type Description
TokenScope GitHubTokenScope

Private Properties

Свойство Type Description

Méthodes publiques

Méthode 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 méthode

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. ///
Résultat void

GetAuthentication() public static méthode

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
Résultat BaseAuthentication

GetCredentials() public méthode

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. ///
Résultat Credential

GitHubAuthentication() public méthode

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

InteractiveLogon() public méthode

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.
Résultat Task

NoninteractiveLogonWithCredentials() public méthode

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.
Résultat Task

SetCredentials() public méthode

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.
Résultat void

ValidateCredentials() public méthode

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.
Résultat Task

Property Details

TokenScope public_oe property

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