extensions/github-authentication/src/githubServer.ts/GitHubServer/getScopes
class GitHubServer:	private async getScopes(token: string): Promise<string[]> {
		try {
			Logger.info('Getting token scopes...');
			const result = await fetch(this.getServerUri('/').toString(), {
				headers: {
					Authorization: `token ${token}`,
					'User-Agent': 'Visual-Studio-Code'
				}
			});

			if (result.ok) {
				const scopes = result.headers.get('X-OAuth-Scopes');
				return scopes ? scopes.split(',').map(scope => scope.trim()) : [];
			} else {
				Logger.error(`Getting scopes failed: ${result.statusText}`);
				throw new Error(result.statusText);
			}
		} catch (ex) {
			Logger.error(ex.message);
			throw new Error(NETWORK_ERROR);
		}
	}