Skip to content

Commit abea60d

Browse files
committed
Remove proposed credentials API (microsoft#31131)
1 parent b29bd1e commit abea60d

2 files changed

Lines changed: 3 additions & 38 deletions

File tree

src/vs/vscode.proposed.d.ts

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -55,40 +55,6 @@ declare module 'vscode' {
5555
export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
5656
}
5757

58-
/**
59-
* Namespace for handling credentials.
60-
*/
61-
export namespace credentials {
62-
63-
/**
64-
* Read a previously stored secret from the credential store.
65-
*
66-
* @param service The service of the credential.
67-
* @param account The account of the credential.
68-
* @return A promise for the secret of the credential.
69-
*/
70-
export function readSecret(service: string, account: string): Thenable<string | undefined>;
71-
72-
/**
73-
* Write a secret to the credential store.
74-
*
75-
* @param service The service of the credential.
76-
* @param account The account of the credential.
77-
* @param secret The secret of the credential to write to the credential store.
78-
* @return A promise indicating completion of the operation.
79-
*/
80-
export function writeSecret(service: string, account: string, secret: string): Thenable<void>;
81-
82-
/**
83-
* Delete a previously stored secret from the credential store.
84-
*
85-
* @param service The service of the credential.
86-
* @param account The account of the credential.
87-
* @return A promise resolving to true if there was a secret for that service and account.
88-
*/
89-
export function deleteSecret(service: string, account: string): Thenable<boolean>;
90-
}
91-
9258
/**
9359
* Represents a color in RGBA space.
9460
*/

src/vs/workbench/api/node/extHost.api.impl.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ export function createApiFactory(
506506
};
507507

508508
// namespace: credentials
509-
const credentials: typeof vscode.credentials = {
509+
const credentials = {
510510
readSecret(service: string, account: string): Thenable<string | undefined> {
511511
return extHostCredentials.readSecret(service, account);
512512
},
@@ -530,7 +530,6 @@ export function createApiFactory(
530530
workspace,
531531
scm,
532532
debug,
533-
credentials,
534533
// types
535534
CancellationTokenSource: CancellationTokenSource,
536535
CodeLens: extHostTypes.CodeLens,
@@ -584,8 +583,8 @@ export function createApiFactory(
584583
Task: extHostTypes.Task,
585584
ConfigurationTarget: extHostTypes.ConfigurationTarget
586585
};
587-
if (!extension.enableProposedApi) {
588-
delete api.credentials; // Instead of error to avoid #31854
586+
if (extension.enableProposedApi && extension.isBuiltin) {
587+
api['credentials'] = credentials;
589588
}
590589
return api;
591590
};

0 commit comments

Comments
 (0)