canonical / surl

Ubuntu Store API thin wrapper
GNU General Public License v3.0
9 stars 11 forks source link

Expired macaroons should be refreshed automatically #53

Open shanepelletier opened 1 year ago

shanepelletier commented 1 year ago

The old behaviour of surl was to refresh expired macaroons whenever it received a "macaroon-needs-refresh" error; the new version of surl should support this so the macaroon never needs to be manually refreshed.

Here's the error returned by SCA when a macaroon needs refreshing, for future reference:

{"error_list": [{"message": "Expired macaroon (age: 103902 seconds)", "code": "macaroon-needs-refresh", "extra": {"age": 103902}}]}