-
Notifications
You must be signed in to change notification settings - Fork 1
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 package #1
Conversation
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.
What a great improvement this refactoring is!
I guess writing tests for GCE would not make much sense? Possibly you could test that it creates a new cache entry different from jwt auth. Up to you!
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.
Awesome stuff!
tokenprovider/token_provider.go
Outdated
} | ||
|
||
// GetAccessToken implements TokenProvider | ||
func (tpi *tokenProviderImpl) GetAccessToken() (string, 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.
I'm not a golang person, but I find this pattern of short and obtuse variable names in grafana's go code to be really hard to read.
Perhaps this could be like tokenProvider
or something else that makes it more readable at first glance?
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.
done
Fixes grafana/grafana#39950
Notes: