IUserSecretsManager
Interface net10.0
Defines an interface for managing user secrets with support for read and write operations.
namespace Aspire.Hosting;
public interface IUserSecretsManager{ // ...}Properties1
Section titled PropertiesMethods3
Section titled MethodsGetOrSetSecret(IConfigurationManager, string, Func<string>)abstract Gets a secret value if it exists in configuration, or sets it using the value generator if it doesn't.
SaveStateAsync(JsonObject, CancellationToken)abstractTask Saves state to user secrets asynchronously (for deployment state manager). If multiple callers save state concurrently, the last write wins.
TrySetSecret(string, string)abstractbool Attempts to set a user secret value synchronously.