/// <summary> /// Configures the data protection system to persist keys to a specified S3 bucket. /// </summary> /// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> /// <param name="config">Provide the configuration object specifying how to write to S3 e.g. from configuration section.</param> /// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> public static IDataProtectionBuilder PersistKeysToAwsS3(this IDataProtectionBuilder builder, IConfiguration config) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } return(builder.PersistKeysToAwsS3Config(null, config)); }