Description

Provides encrypted storage for each plugin module's sensitive data, like access tokens. It uses Keychain on macOS and Credentials Manager on Windows. The data can be stored and retrieved as string-to-string key value pairs via a global secureLocalStorage object. Data for each plugin module (module.json) is kept separate from all others. There is a 2KB limit on the string size because this is meant for small pieces of secure info rather than a generic container.

Example

secureLocalStorage.setItem('myLoginPassword', 'myPassword');
Editor.print("My stored password is: " + secureLocalStorage.getItem('myLoginPassword'));
secureLocalStorage.removeItem('myLoginPassword');
Editor.print("My stored password is: " + secureLocalStorage.getItem('myLoginPassword'));
interface SecureLocalStorage {
    clear(): void;
    getItem(keyName): string;
    getTypeName(): string;
    isOfType(type): boolean;
    isSame(other): boolean;
    length(): number;
    removeItem(keyName): void;
    setItem(keyName, keyValue): void;
}

Hierarchy (view full)

Methods

  • Returns void

    Description

    Remove all values in the storage.

  • Parameters

    • keyName: string

    Returns string

    Description

    Get the value stored under keyName.

  • Returns number

    Description

    Get the length of the storage.

  • Parameters

    • keyName: string

    Returns void

    Description

    Remove the stored value under keyName.

  • Parameters

    • keyName: string
    • keyValue: string

    Returns void

    Description

    Sets the value stored under keyName.

Generated using TypeDoc