[fix/token-timetolerance] Retry requests that failed with a 401 during a token refresh #1105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Re-schedules/retries requests that were:
using the latest token.
Different tokens are identified by comparing the
OCAuthenticationDataID
of the authentication data used when authorizing the request with the latestOCAuthenticationDataID
of the bookmark.This PR also adds an improved representation of the
Authorization
header in the logs. Those now come with a counter that issues a new number whenever the content of theAuthorization
header changes.Those counters are specific to every process, so they likely will not match between File Provider and app. But it allows to see in the logs when token changes occurred in the respective processes. The original idea - logging the
OCAuthenticationDataID
- would have provided the same IDs for all processes, but was thrown out for privacy/security concerns:OCAuthenticationDataID
is a checksum computed fromauthenticationData
- and there would have been the remote possibility that this would provide hints to the actually[redacted]
content.Example: the
Authorization
header before a change to authentication data:… and after:
Related Issue
https://github.com/owncloud/enterprise/issues/5059
Types of changes