Interface: SecretStorage
Defined in: packages/extension-api/src/extension-api.d.ts:4859
Represents a storage utility for secrets, information that is sensitive.
Properties
onDidChange
onDidChange:
Event
<SecretStorageChangeEvent
>
Defined in: packages/extension-api/src/extension-api.d.ts:4884
Fires when a secret is stored or deleted.
Methods
delete()
delete(
key
):Promise
<void
>
Defined in: packages/extension-api/src/extension-api.d.ts:4879
Remove a secret from storage.
Parameters
key
string
The key the secret was stored under.
Returns
Promise
<void
>
get()
get(
key
):Promise
<undefined
|string
>
Defined in: packages/extension-api/src/extension-api.d.ts:4866
Retrieve a secret that was stored with key. Returns undefined if there is no secret matching that key.
Parameters
key
string
The key the secret was stored under.
Returns
Promise
<undefined
| string
>
The stored value or undefined
.
store()
store(
key
,value
):Promise
<void
>
Defined in: packages/extension-api/src/extension-api.d.ts:4873
Store a secret under a given key.
Parameters
key
string
The key to store the secret under.
value
string
The secret.
Returns
Promise
<void
>