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

Interface to secure secrets storage which indexes values by target and utilizes the operating system keychain / secrets vault.
Наследование: BaseSecureStore, ICredentialStore, ITokenStore
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DeleteCredentials ( TargetUri targetUri ) : void

Deletes credentials for target URI from the credential store

DeleteToken ( TargetUri targetUri ) : void

Deletes the token for target URI from the token store

PurgeCredentials ( ) : void

Purges all credentials from the store.

ReadCredentials ( TargetUri targetUri ) : Credential

Reads credentials for a target URI from the credential store

ReadToken ( TargetUri targetUri ) : Token

Reads a token for a target URI from the token store

SecretStore ( string @namespace, ICredentialStore credentialCache = null, ITokenStore tokenCache = null, Secret getTargetName = null ) : System

Creates a new SecretStore backed by the operating system keychain / secrets vault.

WriteCredentials ( TargetUri targetUri, Credential credentials ) : void

Writes credentials for a target URI to the credential store

WriteToken ( TargetUri targetUri, Token token ) : void

Writes a token for a target URI to the token store

Защищенные методы

Метод Описание
GetTargetName ( TargetUri targetUri ) : string

Formats a TargetName string based on the TargetUri base on the format started by git-credential-winstore

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

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

Deletes credentials for target URI from the credential store
public DeleteCredentials ( TargetUri targetUri ) : void
targetUri TargetUri The URI of the target for which credentials are being deleted
Результат void

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

Deletes the token for target URI from the token store
public DeleteToken ( TargetUri targetUri ) : void
targetUri TargetUri The URI of the target for which the token is being deleted
Результат void

GetTargetName() защищенный Метод

Formats a TargetName string based on the TargetUri base on the format started by git-credential-winstore
protected GetTargetName ( TargetUri targetUri ) : string
targetUri TargetUri Uri of the target
Результат string

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

Purges all credentials from the store.
public PurgeCredentials ( ) : void
Результат void

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

Reads credentials for a target URI from the credential store
public ReadCredentials ( TargetUri targetUri ) : Credential
targetUri TargetUri The URI of the target for which credentials are being read
Результат Credential

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

Reads a token for a target URI from the token store
public ReadToken ( TargetUri targetUri ) : Token
targetUri TargetUri The URI of the target for which a token is being read
Результат Token

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

Creates a new SecretStore backed by the operating system keychain / secrets vault.
public SecretStore ( string @namespace, ICredentialStore credentialCache = null, ITokenStore tokenCache = null, Secret getTargetName = null ) : System
@namespace string
credentialCache ICredentialStore /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is /// not provided. ///
tokenCache ITokenStore /// (optional) Write-through, read-first cache. Default cache is used if a custom cache is /// not provided. ///
getTargetName Secret
Результат System

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

Writes credentials for a target URI to the credential store
public WriteCredentials ( TargetUri targetUri, Credential credentials ) : void
targetUri TargetUri The URI of the target for which credentials are being stored
credentials Credential The credentials to be stored
Результат void

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

Writes a token for a target URI to the token store
public WriteToken ( TargetUri targetUri, Token token ) : void
targetUri TargetUri The URI of the target for which a token is being stored
token Token The token to be stored
Результат void