Skip to content

Conversation

sudo-bmitch
Copy link
Contributor

Fixes issue

Fixes #865.

Describe the change

This removes an auth hop that was defaulting to a POST even when a refresh token isn't available, where many token servers do not support the POST. In the GET for a token, the request for an offline refresh token is removed. Requesting a new token will send the original credentials again rather than the refresh token. This improves compatibility with broken auth token servers.

How to verify it

Tests have been updated, and trace logs should show auth going directly to the GET request.

Changelog text

  • Fix: Do not request offline refresh token.

Please verify and check that the pull request fulfills the following requirements

  • Tests have been added or not applicable
  • Documentation has been added, updated, or not applicable
  • Changes have been rebased to main
  • Multiple commits to the same code have been squashed

This improves compatibility with broken auth token servers.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch sudo-bmitch merged commit e7dc58c into regclient:main Jan 8, 2025
5 checks passed
@sudo-bmitch sudo-bmitch deleted the pr-auth-offline-token branch January 8, 2025 16:08
sudo-bmitch added a commit to sudo-bmitch/regclient that referenced this pull request Feb 12, 2025
This fixes a regression caused by PR regclient#893.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] I can pull images using docker but can't pull using regctl from private registry
1 participant