mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 12:47:14 +00:00
Make scopes parameter optional to getSessions and remove getAllSessions
This commit is contained in:
@@ -44,8 +44,10 @@ export class GitHubAuthenticationProvider {
|
||||
context.subscriptions.push(context.secrets.onDidChange(() => this.checkForUpdates()));
|
||||
}
|
||||
|
||||
async getSessions(scopes: string[]): Promise<vscode.AuthenticationSession[]> {
|
||||
return this._sessions.filter(session => arrayEquals(session.scopes, scopes));
|
||||
async getSessions(scopes?: string[]): Promise<vscode.AuthenticationSession[]> {
|
||||
return scopes
|
||||
? this._sessions.filter(session => arrayEquals(session.scopes, scopes))
|
||||
: this._sessions;
|
||||
}
|
||||
|
||||
private async verifySessions(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user