Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow users to specify a prebuilt reqwest client #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tofay
Copy link
Contributor

@tofay tofay commented Mar 28, 2021

if specified this will be used instead of dkregistry creating one.

This makes it easier to use non-standard authentication mechanisms:

  • authenticating with Artifactory registries by setting a custom header
  • setting the Authentication header when interacting with Azure Container Registries.

(In the latter case users login using az tool which writes an oauth2 token to the identitytoken field of the relevant auth section of $HOME/.docker/config.json. When communicating with the registry that token can just be provided by adding the header Authentication: Bearer <token> )

@tofay
Copy link
Contributor Author

tofay commented Mar 28, 2021

In both my use cases I want to build a reqwest client that adds a specific header, so maybe I should be allowing users to specify additional headers instead, to avoid putting reqwest::Client into dkregistry's public API? (I think the use of reqwest is an implementation detail right now)

@vrutkovs
Copy link
Contributor

vrutkovs commented Dec 2, 2021

maybe I should be allowing users to specify additional headers instead

Yeah, I think that would be more flexible and avoid possible API issues. IIUC #212 is implementing that

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.

None yet

2 participants