IUserSecretsManager
Interface net8.0
Defines an interface for managing user secrets with support for read and write operations.
namespace Aspire.Hosting;
public interface IUserSecretsManager{ // ...} 5 members
Properties2
Section titled PropertiesFilePathabstractgetstring Gets the path to the user secrets file.
IsAvailableabstractgetbool Gets a value indicating whether user secrets are available.
Methods3
Section titled MethodsGetOrSetSecret(IConfigurationManager, string, Func<string>)abstractats ignored Gets a secret value if it exists in configuration, or sets it using the value generator if it doesn't.
SaveStateAsync(JsonObject, CancellationToken)abstractats ignoredTask Saves state to user secrets asynchronously (for deployment state manager). If multiple callers save state concurrently, the last write wins.
TrySetSecret(string, string)abstractats exportbool Attempts to set a user secret value synchronously.