-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Add SecretStorage.keys() as proposed API
#252804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/assign @TylerLeonhardt |
Useful for testing PR microsoft/vscode#252804
|
https://github.com/gjsjohnmurray/vscode-extension-samples/tree/test-vscode-252804 provides a way of testing this by adding the following commands to authenticationprovider-sample:
Run the first one or more times, then run the second to see the keys, then the third to delete them all. |
|
Any chance of getting this into this week's endgame? |
|
Im on vacation til the 17th so it won't make this endgame |
| get(key: string): Promise<string | undefined>; | ||
| set(key: string, value: string): Promise<void>; | ||
| delete(key: string): Promise<void>; | ||
| keys(): Promise<string[]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be optional to start... because vscode.dev, github.dev, and maybe code serve-web & @vscode/test-web implement one of these providers and bring them in via:
vscode/src/vs/workbench/browser/web.api.ts
Line 237 in 73fbb0c
| readonly secretStorageProvider?: ISecretStorageProvider; |
since they don't have an implementation today, we should assume that this keys is optional... and error accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can probably easily implement this for vscode.dev... but github.dev I don't have control over... so no promises.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edit: we don't need to worry about serve-web because of:
| ? undefined /* with a remote without embedder-preferred storage, store on the remote */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edit: I don't think we need to worry about @vscode/test-web:
https://github.com/microsoft/vscode-test-web/blob/main/src/browser/main.ts#L266-L269
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have pushed an update. I hope I understood you correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made the change for vscode.dev so that should work (in insiders.vscode.dev)
TylerLeonhardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it!
This PR implements #196616 by adding
SecretStorage.keys()behind asecretStorageKeysproposed API gate.