yoshidan / google-cloud-rust

Google Cloud Client Libraries for Rust.
MIT License
233 stars 85 forks source link

Optional auth crate #92

Closed fredr closed 1 year ago

fredr commented 1 year ago

I'm wondering if you would be open to making the auth crate optional, so that is possible to provide your own auth implementation?

We use our own auth crate for all of our other gcp-related auth. It implements a sans-io approach so that we can control what http client is being used so that we can have the same http client throughout all of our projects.

We are trying to keep our dependency tree down as much as possible (as you might have noticed from my previous contributions), and for us it would be great to be able to use the same gcp auth implementation for all of our dependencies as well.

If you are open to it, I'm of course happy to do the work and implement it. But I wanted to check first that you are willing to merge such a feature.

I haven't looked into how to implement it, but I'm thinking that I would put the auth crate/implementation behind a feature (that is part of the default features), and then use some a trait or something that can be implement by other auth crates.

But I'll properly look into how to implement it if you think this is something you would accept.

yoshidan commented 1 year ago

I am open to your idea. I look forward to your Pull Request.

fredr commented 1 year ago

Closing as this was fixed in #105, thank you :heart: