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 auth options to gcrane #1021

Merged
merged 1 commit into from
May 19, 2021
Merged

Conversation

jonjohnsonjr
Copy link
Collaborator

This allows overriding the use of gcrane.Keychain

This allows overriding the use of gcrane.Keychain
// By default, gcrane will use gcrane.Keychain.
func WithKeychain(keys authn.Keychain) Option {
return func(o *options) {
// Replace the default keychain at position 0.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This feels gross, and brittle. Can we iterate options until we find the one to replace instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think it's possible :/

We had some discussion in #653 but I never came up with a better solution.

@jonjohnsonjr jonjohnsonjr merged commit 8b535fa into google:main May 19, 2021
@jonjohnsonjr jonjohnsonjr deleted the gcrane-auth branch May 19, 2021 21:35
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.

None yet

2 participants