C# Класс Microsoft.Alm.Authentication.GitHubAuthentication

Facilitates GitHub simple and two-factor authentication
Наследование: BaseAuthentication, IGitHubAuthentication
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
TokenScope GitHubTokenScope

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
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.

Описание методов

DeleteCredentials() публичный Метод

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. ///
Результат void

GetAuthentication() публичный статический Метод

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
Результат BaseAuthentication

GetCredentials() публичный Метод

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. ///
Результат Credential

GitHubAuthentication() публичный Метод

public GitHubAuthentication ( GitHubTokenScope tokenScope, ICredentialStore personalAccessTokenStore, AcquireCredentialsDelegate acquireCredentialsCallback, AcquireAuthenticationCodeDelegate acquireAuthenticationCodeCallback, AuthenticationResultDelegate authenticationResultCallback ) : System
tokenScope GitHubTokenScope
personalAccessTokenStore ICredentialStore
acquireCredentialsCallback AcquireCredentialsDelegate
acquireAuthenticationCodeCallback AcquireAuthenticationCodeDelegate
authenticationResultCallback AuthenticationResultDelegate
Результат System

InteractiveLogon() публичный Метод

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.
Результат Task

NoninteractiveLogonWithCredentials() публичный Метод

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.
Результат Task

SetCredentials() публичный Метод

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.
Результат void

ValidateCredentials() публичный Метод

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.
Результат Task

Описание свойств

TokenScope публичное свойство

The desired scope of the authentication token to be requested.
public GitHubTokenScope,Microsoft.Alm.Authentication TokenScope
Результат GitHubTokenScope