Add learnMore proposed API to forceNewSession (#206588)

ref https://github.com/microsoft/vscode/issues/206587
This commit is contained in:
Tyler James Leonhardt
2024-03-01 05:02:41 -08:00
committed by GitHub
parent 19ecb4b833
commit be59ec51ee
4 changed files with 68 additions and 10 deletions

View File

@@ -286,6 +286,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
const authentication: typeof vscode.authentication = {
getSession(providerId: string, scopes: readonly string[], options?: vscode.AuthenticationGetSessionOptions) {
if (typeof options?.forceNewSession === 'object' && options.forceNewSession.learnMore) {
checkProposedApiEnabled(extension, 'authLearnMore');
}
return extHostAuthentication.getSession(extension, providerId, scopes, options as any);
},
getSessions(providerId: string, scopes: readonly string[]) {