This PR updates OAuth handling to not retry if the request has been cancelled, as no further attempts will work, but the wait delay would still be applied.
Now the cancellation triggers immediately, even if we are in the wait stage.
If the server returns an error message, that message is now propagated to the client so the user can see what the problem might be.
Ensures that long-running HTTP requests, such as downloads and uploads, do not timeout prematurely.
This change configures specific HttpClient instances with an infinite timeout to accommodate operations that may take an extended period. The default 100s timeout is retained for some operations like registration, where a long delay may indicate a problem.
This PR removes the `OAuthContextSettings` class, and makes the `--oauth-url` option available on each backend that uses it, so it can be configured as part of the destination.
To assemble everything related to configuring OAuth, the code was moved to the `AuthIdOptionsHelper`, such that the usage can be shared between implementations.
This PR also adds the option to set the default OAuth url from the environment variable `DUPLICATI_OAUTH_SERVICE`.
The server can then be set in the following locations (most important last):
- Environment variable
- Server-wide advanced settings
- Backup job advanced settings (or commandline)
- Destination url