Closed vlad-ivanov-name closed 8 months ago
Im not sure what the authentication scheme looks like for pypi registries but we might be able to reuse AuthenticatedClient
in rattler_networking
for this.
Added "reqwest with middleware" client so this is now supported in API
To support custom/private pip registries (https://github.com/prefix-dev/pixi/issues/588),
PackageDb
needs to support authentication.I would propose the following API:
1) create a trait that lives somewhere near
PackageDb
, e. g.ProvidesAuth
2) the trait would include anauthorize
method (does it need to accept request body and headers? at least in case with google cloud it doesn't need to) 3) let clients like pixi implement the trait and pass an instance of an object viaOption<Box<dyn ProvidesAuth>>
I'm open to other suggestions and feedback on this