public void Unload() { _logger = null; _vaultClient = null; _configuration.Clear(); _configuration = null; }
public void SetVaultCredential(string credential) { if (_configuration != null && credential != null) { try { _vaultClient = new VaultConnection(_configuration[AddressName], credential, _logger); _logger.Information($"Plugin {Name} successfully authenticated."); } catch (Exception ex) { _logger.Information(ex, $"Invalid configuration for {Name}. Please use the api to set a valid configuration. {ex.Message}"); } } else { _logger.Error("The plugin configuration or credential is missing."); } }