@@ -18,59 +18,6 @@ declare module 'vscode' {
1818
1919 // #region auth provider: https://github.com/microsoft/vscode/issues/88309
2020
21- export interface AuthenticationSession {
22- /**
23- * The identifier of the authentication session.
24- */
25- readonly id : string ;
26-
27- /**
28- * The access token.
29- */
30- readonly accessToken : string ;
31-
32- /**
33- * The account associated with the session.
34- */
35- readonly account : AuthenticationSessionAccountInformation ;
36-
37- /**
38- * The permissions granted by the session's access token. Available scopes
39- * are defined by the authentication provider.
40- */
41- readonly scopes : ReadonlyArray < string > ;
42- }
43-
44- /**
45- * The information of an account associated with an authentication session.
46- */
47- export interface AuthenticationSessionAccountInformation {
48- /**
49- * The unique identifier of the account.
50- */
51- readonly id : string ;
52-
53- /**
54- * The human-readable name of the account.
55- */
56- readonly label : string ;
57- }
58-
59- /**
60- * Basic information about an[authenticationProvider](#AuthenticationProvider)
61- */
62- export interface AuthenticationProviderInformation {
63- /**
64- * The unique identifier of the authentication provider.
65- */
66- readonly id : string ;
67-
68- /**
69- * The human-readable name of the authentication provider.
70- */
71- readonly label : string ;
72- }
73-
7421 /**
7522 * An [event](#Event) which fires when an [AuthenticationProvider](#AuthenticationProvider) is added or removed.
7623 */
@@ -86,33 +33,10 @@ declare module 'vscode' {
8633 readonly removed : ReadonlyArray < AuthenticationProviderInformation > ;
8734 }
8835
89- /**
90- * Options to be used when getting a session from an [AuthenticationProvider](#AuthenticationProvider).
91- */
92- export interface AuthenticationGetSessionOptions {
93- /**
94- * Whether login should be performed if there is no matching session. Defaults to false.
95- */
96- createIfNone ?: boolean ;
97-
98- /**
99- * Whether the existing user session preference should be cleared. Set to allow the user to switch accounts.
100- * Defaults to false.
101- */
102- clearSessionPreference ?: boolean ;
103- }
104-
105- export interface AuthenticationProviderAuthenticationSessionsChangeEvent {
106- /**
107- * The [authenticationProvider](#AuthenticationProvider) that has had its sessions change.
108- */
109- readonly provider : AuthenticationProviderInformation ;
110- }
111-
11236 /**
11337 * An [event](#Event) which fires when an [AuthenticationSession](#AuthenticationSession) is added, removed, or changed.
11438 */
115- export interface AuthenticationSessionsChangeEvent {
39+ export interface AuthenticationProviderAuthenticationSessionsChangeEvent {
11640 /**
11741 * The ids of the [AuthenticationSession](#AuthenticationSession)s that have been added.
11842 */
@@ -156,7 +80,7 @@ declare module 'vscode' {
15680 * An [event](#Event) which fires when the array of sessions has changed, or data
15781 * within a session has changed.
15882 */
159- readonly onDidChangeSessions : Event < AuthenticationSessionsChangeEvent > ;
83+ readonly onDidChangeSessions : Event < AuthenticationProviderAuthenticationSessionsChangeEvent > ;
16084
16185 /**
16286 * Returns an array of current sessions.
@@ -210,30 +134,6 @@ declare module 'vscode' {
210134 */
211135 export const providers : ReadonlyArray < AuthenticationProviderInformation > ;
212136
213- /**
214- * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
215- * registered, or if the user does not consent to sharing authentication information with
216- * the extension. If there are multiple sessions with the same scopes, the user will be shown a
217- * quickpick to select which account they would like to use.
218- * @param providerId The id of the provider to use
219- * @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
220- * @param options The [getSessionOptions](#GetSessionOptions) to use
221- * @returns A thenable that resolves to an authentication session
222- */
223- export function getSession ( providerId : string , scopes : string [ ] , options : AuthenticationGetSessionOptions & { createIfNone : true } ) : Thenable < AuthenticationSession > ;
224-
225- /**
226- * Get an authentication session matching the desired scopes. Rejects if a provider with providerId is not
227- * registered, or if the user does not consent to sharing authentication information with
228- * the extension. If there are multiple sessions with the same scopes, the user will be shown a
229- * quickpick to select which account they would like to use.
230- * @param providerId The id of the provider to use
231- * @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
232- * @param options The [getSessionOptions](#GetSessionOptions) to use
233- * @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
234- */
235- export function getSession ( providerId : string , scopes : string [ ] , options : AuthenticationGetSessionOptions ) : Thenable < AuthenticationSession | undefined > ;
236-
237137 /**
238138 * @deprecated
239139 * Logout of a specific session.
@@ -242,13 +142,6 @@ declare module 'vscode' {
242142 * provider
243143 */
244144 export function logout ( providerId : string , sessionId : string ) : Thenable < void > ;
245-
246- /**
247- * An [event](#Event) which fires when the array of sessions has changed, or data
248- * within a session has changed for a provider. Fires with the ids of the providers
249- * that have had session data change.
250- */
251- export const onDidChangeSessions : Event < AuthenticationProviderAuthenticationSessionsChangeEvent > ;
252145 }
253146
254147 //#endregion
0 commit comments