public static IVaultService AuthenticateUsingToken(this DefaultVaultService vaultService, string token) { var auth = new TokenAuthentication(vaultService, token); vaultService.AuthenticateAsync(auth).ConfigureAwait(false).GetAwaiter().GetResult(); return(vaultService); }
public static IVaultService AuthenticateUsingUserPass(this DefaultVaultService vaultService, string userName, string password) { var auth = new UserPassAuthentication(vaultService); auth.Credentials(userName, password); vaultService.AuthenticateAsync(auth).ConfigureAwait(false).GetAwaiter().GetResult(); return(vaultService); }