loic-sharma / BaGet

A lightweight NuGet and symbol server
https://loic-sharma.github.io/BaGet/
MIT License
2.61k stars 669 forks source link

Refresh the Azure SAS token before its expiration? #742

Open rmt2021 opened 2 years ago

rmt2021 commented 2 years ago

Describe the bug

The current GetDownloadUriAsync will set the expiry time to 10 mins. However, the token may expire when the read operation has not been finished, so a 403 Forbidden will be encountered.

Expected behavior

We can refresh the token before it gets expired, then users could retry their operation again.

loic-sharma commented 2 years ago

I'd be happy to accept a contribution that increases the expiry time to a higher yet reasonable value.