diff --git a/extensions/github-authentication/src/common/keychain.ts b/extensions/github-authentication/src/common/keychain.ts index 4c7c8c93c30..d1dc0a32a64 100644 --- a/extensions/github-authentication/src/common/keychain.ts +++ b/extensions/github-authentication/src/common/keychain.ts @@ -34,7 +34,7 @@ export class Keychain { constructor(private context: vscode.ExtensionContext) { } async setToken(token: string): Promise { try { - return await this.context.secrets.set(SERVICE_ID, token); + return await this.context.secrets.store(SERVICE_ID, token); } catch (e) { // Ignore Logger.error(`Setting token failed: ${e}`); diff --git a/extensions/microsoft-authentication/src/keychain.ts b/extensions/microsoft-authentication/src/keychain.ts index e23603be080..1a0001c117e 100644 --- a/extensions/microsoft-authentication/src/keychain.ts +++ b/extensions/microsoft-authentication/src/keychain.ts @@ -48,7 +48,7 @@ export class Keychain { async setToken(token: string): Promise { try { - return await this.context.secrets.set(SERVICE_ID, token); + return await this.context.secrets.store(SERVICE_ID, token); } catch (e) { Logger.error(`Setting token failed: ${e}`); diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index a55ef6d349b..20bcb3a15bf 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -2518,7 +2518,7 @@ declare module 'vscode' { /** * The key of the secret that has changed. */ - key: string; + readonly key: string; } /** @@ -2539,7 +2539,7 @@ declare module 'vscode' { * @param key The key to store the password under. * @param value The password. */ - set(key: string, value: string): Thenable; + store(key: string, value: string): Thenable; /** * Remove a secret from storage. @@ -2554,7 +2554,7 @@ declare module 'vscode' { } export interface ExtensionContext { - secrets: SecretStorage; + readonly secrets: SecretStorage; } //#endregion diff --git a/src/vs/workbench/api/common/exHostSecretState.ts b/src/vs/workbench/api/common/exHostSecretState.ts index 2715b881f75..b06f1245094 100644 --- a/src/vs/workbench/api/common/exHostSecretState.ts +++ b/src/vs/workbench/api/common/exHostSecretState.ts @@ -25,7 +25,7 @@ export class ExtHostSecretState implements ExtHostSecretStateShape { return this._proxy.$getPassword(extensionId, key); } - set(extensionId: string, key: string, value: string): Promise { + store(extensionId: string, key: string, value: string): Promise { return this._proxy.$setPassword(extensionId, key, value); } diff --git a/src/vs/workbench/api/common/extHostSecrets.ts b/src/vs/workbench/api/common/extHostSecrets.ts index 837b36f514f..a593f0ad1f7 100644 --- a/src/vs/workbench/api/common/extHostSecrets.ts +++ b/src/vs/workbench/api/common/extHostSecrets.ts @@ -33,8 +33,8 @@ export class ExtensionSecrets implements vscode.SecretStorage { return this._secretState.get(this._id, key); } - set(key: string, value: string): Promise { - return this._secretState.set(this._id, key, value); + store(key: string, value: string): Promise { + return this._secretState.store(this._id, key, value); } delete(key: string): Promise {