Rename login/logout to createSession/removeSession

This commit is contained in:
Rachel Macfarlane
2021-02-11 16:44:35 -08:00
parent ea865096f1
commit eceff53351
12 changed files with 52 additions and 52 deletions

View File

@@ -158,7 +158,7 @@ export class GitHubAuthenticationProvider {
return this._sessions;
}
public async login(scopes: string): Promise<vscode.AuthenticationSession> {
public async createSession(scopes: string): Promise<vscode.AuthenticationSession> {
const token = await this._githubServer.login(scopes);
const session = await this.tokenToSession(token, scopes.split(' '));
await this.setToken(session);
@@ -190,7 +190,7 @@ export class GitHubAuthenticationProvider {
await this.storeSessions();
}
public async logout(id: string): Promise<vscode.AuthenticationSession | undefined> {
public async removeSession(id: string): Promise<vscode.AuthenticationSession | undefined> {
Logger.info(`Logging out of ${id}`);
const sessionIndex = this._sessions.findIndex(session => session.id === id);
let session: vscode.AuthenticationSession | undefined;