/// <summary>
        /// Add Vault as a configuration provider.
        /// </summary>
        /// <param name="configuration">Configuration builder instance.</param>
        /// <param name="basePath">Base path for vault keys.</param>
        /// <param name="mountPoint">KV mounting point.</param>
        /// <param name="logger">Logger instance.</param>
        /// <returns>Instance of <see cref="IConfigurationBuilder"/>.</returns>
        public static IConfigurationBuilder AddVaultConfiguration(
            this IConfigurationBuilder configuration,
            string basePath,
            string?mountPoint = null,
            ILogger?logger    = null)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            if (basePath == null)
            {
                throw new ArgumentNullException(nameof(basePath));
            }

            var vaultOptions = new VaultOptions(
                Environment.GetEnvironmentVariable(VaultEnvironmentVariableNames.Address) ??
                VaultConfigurationSource.DefaultVaultUrl,
                Environment.GetEnvironmentVariable(VaultEnvironmentVariableNames.Token) ?? VaultConfigurationSource.DefaultVaultToken,
                Environment.GetEnvironmentVariable(VaultEnvironmentVariableNames.Secret),
                Environment.GetEnvironmentVariable(VaultEnvironmentVariableNames.RoleId));

            configuration.Add(new VaultConfigurationSource(vaultOptions, basePath, mountPoint, logger));
            return(configuration);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="VaultConfigurationSource"/> class.
 /// </summary>
 /// <param name="options">Vault options.</param>
 /// <param name="basePath">Base path.</param>
 /// <param name="mountPoint">Mounting point.</param>
 /// <param name="logger">Logger instance.</param>
 public VaultConfigurationSource(VaultOptions options, string basePath, string?mountPoint = null, ILogger?logger = null)
 {
     this._logger    = logger;
     this.Options    = options;
     this.BasePath   = basePath;
     this.MountPoint = mountPoint ?? SecretsEngineMountPoints.Defaults.KeyValueV2;
 }