yoshidan / google-cloud-rust

Google Cloud Client Libraries for Rust.
MIT License
217 stars 81 forks source link

create_token_source function deprecated, recommended TokenSourceProvider not public. #250

Closed clement-chaneching closed 2 months ago

clement-chaneching commented 2 months ago

Hello,

I m trying to implement the google-cloud authentication module in rattler for pixi to automatically pick up the authentication for our private conda channel hosted on a GCS Bucket.

Everything works perfectly fine, but I have this warning that the create_token_source function has been deprecated, and the recommended TokenSourceProvider is not public, so I cannot implement the recommended : DefaultTokenSourceProvider

Is there a workaround that I m not aware of? Are you planning to update the documentation soon?

Thanks for your help!

clement-chaneching commented 2 months ago

Nevermind, the issue is just because I was testing with the latest main, not the latest tag.

yoshidan commented 2 months ago

sorry for late response.

TokenSourceProvier in main branch is now public. https://github.com/yoshidan/google-cloud-rust/blob/ff65df43a1bb8ffd6bfaa3c047186ba137345a79/foundation/token/src/lib.rs#L12

TokenSourceProvier is not in google-cloud-auth but in google-cloud-token crate.

In this case it seems you can use google_cloud_auth::token::DefaultTokenSourceProvider::new directly.