]> git.lizzy.rs Git - rust.git/commit
Allow to use a Github Auth token for fetching releases
authorMatthias Einwag <matthias.einwag@live.com>
Wed, 23 Sep 2020 06:12:51 +0000 (23:12 -0700)
committerMatthias Einwag <matthias.einwag@live.com>
Wed, 23 Sep 2020 06:12:51 +0000 (23:12 -0700)
commitb93ced6f633fab2733b40aef2541582b00e053fb
treed4f100e94e0f8cbece5fddc76385f42cdd181e45
parentbcdedbb3d5a45ea974cc5f8e9068e9604c43a757
Allow to use a Github Auth token for fetching releases

This change allows to use a authorization token provided by Github in
order to fetch metadata for a RA release. Using an authorization token
prevents to get rate-limited in environments where lots of RA users use
a shared client IP (e.g. behind a company NAT).

The auth token is stored in `ExtensionContext.globalState`.
As far as I could observe through testing with a local WSL2 environment
that state is synced between an extension installed locally and a remote
version.

The change provides no explicit command to query for an auth token.
However in case a download fails it will provide a retry option as well
as an option to enter the auth token. This should be more discoverable
for most users.

Closes #3688
editors/code/src/main.ts
editors/code/src/net.ts
editors/code/src/persistent_state.ts