authentication implicit activation events (#166715)

* `authentication` implicit activation events

* More safety accessing `.id`
This commit is contained in:
Joyce Er 2022-11-19 08:30:48 -08:00 committed by GitHub
parent 63f8550155
commit 3bdea7784d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View file

@ -17,10 +17,7 @@
"ui",
"workspace"
],
"activationEvents": [
"onAuthenticationRequest:github",
"onAuthenticationRequest:github-enterprise"
],
"activationEvents": [],
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {

View file

@ -12,9 +12,7 @@
"categories": [
"Other"
],
"activationEvents": [
"onAuthenticationRequest:microsoft"
],
"activationEvents": [],
"enabledApiProposals": [
"telemetryLogger",
"idToken"

View file

@ -152,6 +152,13 @@ const authenticationExtPoint = ExtensionsRegistry.registerExtensionPoint<Authent
description: nls.localize({ key: 'authenticationExtensionPoint', comment: [`'Contributes' means adds here`] }, 'Contributes authentication'),
type: 'array',
items: authenticationDefinitionSchema
},
activationEventsGenerator: (authenticationProviders, result) => {
for (const authenticationProvider of authenticationProviders) {
if (authenticationProvider.id) {
result.push(`onAuthenticationRequest:${authenticationProvider.id}`);
}
}
}
});