VS Code API
    Preparing search index...

    Interface SecretStorage

    Represents a storage utility for secrets (or any information that is sensitive) that will be stored encrypted. The implementation of the secret storage will be different on each platform and the secrets will not be synced across machines.

    interface SecretStorage {
        onDidChange: Event<SecretStorageChangeEvent>;
        delete(key: string): Thenable<void>;
        get(key: string): Thenable<string | undefined>;
        keys(): Thenable<string[]>;
        store(key: string, value: string): Thenable<void>;
    }
    Index

    Properties

    Methods

    Properties

    Fires when a secret is stored or deleted.

    Methods

    • Remove a secret from storage.

      Parameters

      • key: string

        The key the secret was stored under.

      Returns Thenable<void>

    • Retrieve a secret that was stored with key. Returns undefined if there is no password matching that key.

      Parameters

      • key: string

        The key the secret was stored under.

      Returns Thenable<string | undefined>

      The stored value or undefined.

    • Store a secret under a given key.

      Parameters

      • key: string

        The key to store the secret under.

      • value: string

        The secret.

      Returns Thenable<void>