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

Add TokenProvider::email() method #116

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add TokenProvider::email() method #116

wants to merge 3 commits into from

Conversation

djc
Copy link
Owner

@djc djc commented Jul 11, 2024

Because TokenProvider is a trait (and not sealed), this is technically a breaking change. Since there's just been a breaking change a month ago, not sure if we want a breaking change for this again? If so, maybe also turn it into an enum instead of a trait...

r? @valkum

@@ -51,6 +51,10 @@ impl TokenProvider for GCloudAuthorizedUser {
Ok(token)
}

async fn email(&self) -> Result<String, Error> {
run(&["auth", "print-identity-token"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this needs additional steps as it only returns the token but not the email.

@valkum
Copy link
Contributor

valkum commented Jul 15, 2024

Wondering if any users make use of the trait. If not, it does make sense to exchange this with an enum. The types of auth are finite, and I currently can't see any need to be able to specify your own token provider.
Maybe we should release the change together with the trait -> enum conversion as a -rc.0 first?

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.

2 participants