LaunchBoxCONTRIBUTORS
On this page

14.1 Beta 1 SDK

This reference documents the current beta SDK. Beta APIs can change before stable.

IPluginSecretStore14.1 Beta

C#
public interface Unbroken.LaunchBox.Plugins.IPluginSecretStore
Provides protected persistent storage scoped to the requesting plugin and current machine.

Remarks

Protected values may become unreadable after an operating-system or machine migration. Plugins should store only reacquirable secrets here and treat an unavailable value as requiring reconnection.

Methods

GetValueAsync 14.1 Beta

C#
System.Threading.Tasks.Task<byte[]?> GetValueAsync(Unbroken.LaunchBox.Plugins.PluginSecretStoreGetArgs args, System.Threading.CancellationToken cancellationToken)
Gets the requested protected value, or null when no value exists.
args 14.1 Beta
The plugin-local key identifying the protected value.
cancellationToken 14.1 Beta
A token requesting cancellation of the operation.

Returns

The unprotected bytes, or null when the key has no value.
Exception: System.IO.InvalidDataException
The saved payload is invalid or cannot be unprotected on this machine. The stored bytes are retained.

RemoveValueAsync 14.1 Beta

C#
System.Threading.Tasks.Task RemoveValueAsync(Unbroken.LaunchBox.Plugins.PluginSecretStoreRemoveArgs args, System.Threading.CancellationToken cancellationToken)
Removes the requested protected value.
args 14.1 Beta
The plugin-local key identifying the protected value to remove.
cancellationToken 14.1 Beta
A token requesting cancellation of the operation.

Returns

A task representing the removal operation.

SetValueAsync 14.1 Beta

C#
System.Threading.Tasks.Task SetValueAsync(Unbroken.LaunchBox.Plugins.PluginSecretStoreSetArgs args, System.Threading.CancellationToken cancellationToken)
Protects and stores the requested value.
args 14.1 Beta
The plugin-local key and unprotected bytes to protect and persist.
cancellationToken 14.1 Beta
A token requesting cancellation of the operation.

Returns

A task representing the storage operation.