Open tofay opened 3 years ago
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)
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 https://github.com/camallo/dkregistry-rs/pull/212 is implementing that
if specified this will be used instead of dkregistry creating one.
This makes it easier to use non-standard authentication mechanisms:
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 headerAuthentication: Bearer <token>
)