-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
84 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
declare module 'vscode' { | ||
|
||
// https://github.com/microsoft/vscode/issues/152399 | ||
|
||
export namespace authentication { | ||
/** | ||
* Get all authentication sessions matching the desired scopes that this extension has access to. In order to request access, | ||
* use {@link getSession}. To request an additional account, specify {@link AuthenticationGetSessionOptions.clearSessionPreference} | ||
* and {@link AuthenticationGetSessionOptions.createIfNone} together. | ||
* | ||
* Currently, there are only two authentication providers that are contributed from built in extensions | ||
* to the editor that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'. | ||
* | ||
* @param providerId The id of the provider to use | ||
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider | ||
* @returns A thenable that resolves to a readonly array of authentication sessions. | ||
*/ | ||
export function getSessions(providerId: string, scopes: readonly string[]): Thenable<readonly AuthenticationSession[]>; | ||
} | ||
} |