-
Notifications
You must be signed in to change notification settings - Fork 34
Registry tool: add auth handling #681
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
Conversation
|
Is there a strong reason to prefer "generator" over other command names? My initial preference on seeing it was to suggest "provider", but when I looked for other precedents I found "source" in the Go oauth2 package, which I think has a stronger case to be made for it. "generator" feels awkward to me because we have so many situations where code is generated. Tokens are more short-lived. ... Could setting this be handed with |
| } | ||
|
|
||
| // Resolve derived values (eg. Registry.Token from Registry.TokenCmd) | ||
| func (c *Configuration) Resolve() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How frequently is this run?
- before every token usage?
- once for each run of the registry tool?
- when tokens expire?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, this would only happen on load - ie. #2.
Codecov Report
@@ Coverage Diff @@
## main #681 +/- ##
==========================================
- Coverage 55.56% 55.49% -0.07%
==========================================
Files 89 93 +4
Lines 7712 7837 +125
==========================================
+ Hits 4285 4349 +64
- Misses 2972 3021 +49
- Partials 455 467 +12
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Nope. I think "token-source" would be fine.
I was trying to keep with your idea of putting this auth stuff on "auth" instead of config. Is that not desirable? |
I guess I'm undecided about this - on one hand, it's good to have |
Yeah, I don't have a strong opinion either way. We could do |
Set and view registry CLI authentication.
Added auth command:
To set or get
token-source, use commands:Fixes #675