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

oauth: mark NewOauthAccess as deprecated and update examples to use TokenSource #5882

Merged
merged 2 commits into from
Dec 28, 2022

Conversation

buzzsurfr
Copy link
Contributor

@buzzsurfr buzzsurfr commented Dec 20, 2022

Fixes #5415

SUMMARY OF CHANGES

  • Mark oauth.NewOauthAccess as deprecated, pointing to oauth.TokenSource
  • Change authentication and interceptor example clients to use oauth.TokenSource
  • Change interop to use oauth.TokenSource

RELEASE NOTES:

  • Mark oauth.NewOauthAccess as deprecated

@buzzsurfr
Copy link
Contributor Author

buzzsurfr commented Dec 20, 2022

FYI, go's parser gives a warning one of the files in interop, stating:

"io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.  (SA1019)

The offending line is interop/client/client.go#L156

b, err := ioutil.ReadFile(*caFile)

According to the message, this should be replaced with os.ReadFile.

Should I file a new issue and fix it with a new PR, or loop it into this one?

UPDATE: I found 42 references to ioutil.ReadFile in the repo, so would also need to know whether to fix one or all.

@easwars easwars self-assigned this Dec 27, 2022
@easwars easwars added the Type: Documentation Documentation or examples label Dec 27, 2022
@easwars easwars added this to the 1.53 Release milestone Dec 27, 2022
@easwars
Copy link
Contributor

easwars commented Dec 27, 2022

Should I file a new issue and fix it with a new PR, or loop it into this one?

UPDATE: I found 42 references to ioutil.ReadFile in the repo, so would also need to know whether to fix one or all.

Given that we have so many references, a separate issue would be more appropriate. Thanks.

@easwars easwars changed the title Mark NewOauthAccess as deprecated and change examples to use oauth.TokenSource oauth: mark NewOauthAccess as deprecated and update examples to use TokenSource Dec 27, 2022
Copy link
Member

@arvindbr8 arvindbr8 left a comment

Choose a reason for hiding this comment

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

LGTM

@arvindbr8 arvindbr8 merged commit c90744f into grpc:master Dec 28, 2022
@easwars
Copy link
Contributor

easwars commented Dec 28, 2022

@buzzsurfr : Thank you for your contribution !!

@buzzsurfr buzzsurfr deleted the depr-newoauthaccess branch December 28, 2022 18:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Documentation Documentation or examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

credentials/oauth: mark oauth.NewOauthAccess as deprecated and point users to oauth.TokenSource
3 participants