SecureLocalStorage
ClassProvides encrypted storage for each plugin module's sensitive data, like access tokens.
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.
Index
Example
secureLocalStorage.setItem('myLoginPassword', 'myPassword');
console.log("My stored password is: " + secureLocalStorage.getItem('myLoginPassword'));
secureLocalStorage.removeItem('myLoginPassword');
console.log("My stored password is: " + secureLocalStorage.getItem('myLoginPassword'));
Extends
Methods
clear()
clear():
void
Remove all values in the storage.
Returns
void
getItem()
getItem(
keyName):string
Get the value stored under keyName.
Parameters
| Parameter | Type |
|---|---|
keyName | string |
Returns
string
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
length()
length():
number
Get the length of the storage.
Returns
number
removeItem()
removeItem(
keyName):void
Remove the stored value under keyName.
Parameters
| Parameter | Type |
|---|---|
keyName | string |
Returns
void
setItem()
setItem(
keyName,keyValue):void
Sets the value stored under keyName.
Parameters
| Parameter | Type |
|---|---|
keyName | string |
keyValue | string |
Returns
void