Type Alias SecretStorage

The contract for a storage implementation that can be used to store oauth access tokens.

type SecretStorage = {
    delete: (key: string) => Promise<void>;
    get: (key: string) => Promise<string | undefined>;
    store: (key: string, value: string) => Promise<void>;
}
Index

Properties

Properties

delete: (key: string) => Promise<void>

Delete a stored secret value by its key.

get: (key: string) => Promise<string | undefined>

Retrieve a stored secret value by its key. The implementation should return undefined if no value is found for the key.

store: (key: string, value: string) => Promise<void>

Store a secret value with the specified key. Encryption or other security measures are the responsibility of the implementation.